From 7d4d2e831e99a7cdb12e1730cdf3ca51a9287a6c Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Thu, 7 Mar 2024 04:20:01 +0100 Subject: [PATCH] [backend/masto-client] Fix notifications endpoints when notification has no notifier (because the user was deleted, etc) --- Iceshrimp.Backend/Controllers/Mastodon/NotificationController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Iceshrimp.Backend/Controllers/Mastodon/NotificationController.cs b/Iceshrimp.Backend/Controllers/Mastodon/NotificationController.cs index 84f9e04d..5efd8a6c 100644 --- a/Iceshrimp.Backend/Controllers/Mastodon/NotificationController.cs +++ b/Iceshrimp.Backend/Controllers/Mastodon/NotificationController.cs @@ -36,6 +36,7 @@ public class NotificationController(DatabaseContext db, NotificationRenderer not var res = await db.Notifications .IncludeCommonProperties() .Where(p => p.Notifiee == user) + .Where(p => p.Notifier != null) .Where(p => p.Type == NotificationType.Follow || p.Type == NotificationType.Mention || p.Type == NotificationType.Reply ||