savvato-software / tribe-app-backend

3 stars 20 forks source link

Backend - Implement ping #201

Open haxwell opened 6 months ago

haxwell commented 6 months ago

So far, the 4 restriction levels are:

Directly having the attribute

Having the attribute and having it be cosigned

Having the attribute, having it be cosigned by a specific person

Pinger (person who is making the ping) is connected with the announcer

These restriction levels should be stored in the database. We also need an announcements table, which contains the announcement itself, and an announcement_details table, which contains information about the announcement’s restriction level.

When a ping is made, get the whole list of announcements. Then on backend, if the announcement applied to the user isn't already cached, then filter like so:

{code:java}public boolean doesUserHaveAttribute(Long phraseId, Long userId) {