mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-30 00:22:25 -05:00
feature: filters v2 server-side warning/hiding (#2793)
* Remove dead code * Filter statuses when converting to frontend representation * status.filtered is an array * Make matching case-insensitive * Remove TODOs that don't need to be done now * Add missing filter check for notification * lint: rename ErrHideStatus * APIFilterActionToFilterAction not used yet * swaggerino docseroni * Address review comments * Add apimodel.FilterActionNone --------- Co-authored-by: tobi <31960611+tsmethurst@users.noreply.github.com> Co-authored-by: tobi <tobi.smethurst@protonmail.com>
This commit is contained in:
parent
a0d066844f
commit
45f4afe60e
24 changed files with 855 additions and 130 deletions
|
|
@ -467,7 +467,12 @@ func (s *Surface) Notify(
|
|||
unlock()
|
||||
|
||||
// Stream notification to the user.
|
||||
apiNotif, err := s.Converter.NotificationToAPINotification(ctx, notif)
|
||||
filters, err := s.State.DB.GetFiltersForAccountID(ctx, targetAccount.ID)
|
||||
if err != nil {
|
||||
return gtserror.Newf("couldn't retrieve filters for account %s: %w", targetAccount.ID, err)
|
||||
}
|
||||
|
||||
apiNotif, err := s.Converter.NotificationToAPINotification(ctx, notif, filters)
|
||||
if err != nil {
|
||||
return gtserror.Newf("error converting notification to api representation: %w", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue