From 14f078d145a2185830390bc54d1815577a646905 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Sat, 14 Sep 2024 02:42:44 +0200 Subject: [PATCH] [backend/core] Don't generate reply notifications for remote users --- Iceshrimp.Backend/Core/Services/NotificationService.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Iceshrimp.Backend/Core/Services/NotificationService.cs b/Iceshrimp.Backend/Core/Services/NotificationService.cs index 8a5cc1d3..9a4bd330 100644 --- a/Iceshrimp.Backend/Core/Services/NotificationService.cs +++ b/Iceshrimp.Backend/Core/Services/NotificationService.cs @@ -58,9 +58,15 @@ public class NotificationService( .Select(p => p.BlockerId) .ToListAsync(); + var remote = await db.Users + .Where(p => users.Contains(p.Id) && p.IsRemoteUser) + .Select(p => p.Id) + .ToListAsync(); + var notifications = users .Where(p => p != note.UserId) .Except(blocks) + .Except(remote) .Select(p => new Notification { Id = IdHelpers.GenerateSlowflakeId(),