From 2cfbc305fc05462c8fb0adfa1476765c8a78e13b Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Tue, 13 Feb 2024 19:30:14 +0100 Subject: [PATCH] [backend/masto-client] Add visibility filters in NotificationController (ISH-45) --- .../Controllers/Mastodon/NotificationController.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Iceshrimp.Backend/Controllers/Mastodon/NotificationController.cs b/Iceshrimp.Backend/Controllers/Mastodon/NotificationController.cs index 8c6ee697..e05113f4 100644 --- a/Iceshrimp.Backend/Controllers/Mastodon/NotificationController.cs +++ b/Iceshrimp.Backend/Controllers/Mastodon/NotificationController.cs @@ -39,8 +39,14 @@ public class NotificationController(DatabaseContext db, NotificationRenderer not || p.Type == NotificationType.Reaction || p.Type == NotificationType.PollEnded || p.Type == NotificationType.FollowRequestReceived) + .EnsureNoteVisibilityFor(p => p.Note, user) + .FilterBlocked(p => p.Notifier, user) + .FilterBlocked(p => p.Note, user) .Paginate(query, ControllerContext) .RenderAllForMastodonAsync(notificationRenderer); + + //TODO: handle mutes + //TODO: handle reply/renote visibility return Ok(res); }