[backend/masto-client] Add visibility filters in NotificationController (ISH-45)

This commit is contained in:
Laura Hausmann 2024-02-13 19:30:14 +01:00
parent 85073fc871
commit 2cfbc305fc
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -39,9 +39,15 @@ public class NotificationController(DatabaseContext db, NotificationRenderer not
|| p.Type == NotificationType.Reaction || p.Type == NotificationType.Reaction
|| p.Type == NotificationType.PollEnded || p.Type == NotificationType.PollEnded
|| p.Type == NotificationType.FollowRequestReceived) || p.Type == NotificationType.FollowRequestReceived)
.EnsureNoteVisibilityFor(p => p.Note, user)
.FilterBlocked(p => p.Notifier, user)
.FilterBlocked(p => p.Note, user)
.Paginate(query, ControllerContext) .Paginate(query, ControllerContext)
.RenderAllForMastodonAsync(notificationRenderer); .RenderAllForMastodonAsync(notificationRenderer);
//TODO: handle mutes
//TODO: handle reply/renote visibility
return Ok(res); return Ok(res);
} }
} }