diff --git a/server/lib/notifications/agents/discord.ts b/server/lib/notifications/agents/discord.ts index f88d8b88..c3089cdc 100644 --- a/server/lib/notifications/agents/discord.ts +++ b/server/lib/notifications/agents/discord.ts @@ -249,7 +249,10 @@ class DiscordAgent NotificationAgentKey.DISCORD, type ) && - user.settings?.discordId + user.settings?.discordId && + // Check if it's the user's own auto-approved request + (type !== Notification.MEDIA_AUTO_APPROVED || + user.id !== payload.request?.requestedBy.id) ) .map((user) => `<@${user.settings?.discordId}>`) .join(' '); diff --git a/server/lib/notifications/agents/email.ts b/server/lib/notifications/agents/email.ts index 56401c0d..593543a5 100644 --- a/server/lib/notifications/agents/email.ts +++ b/server/lib/notifications/agents/email.ts @@ -208,7 +208,10 @@ class EmailAgent NotificationAgentKey.EMAIL, type ) ?? - true)) + true)) && + // Check if it's the user's own auto-approved request + (type !== Notification.MEDIA_AUTO_APPROVED || + user.id !== payload.request?.requestedBy.id) ) .map(async (user) => { logger.debug('Sending email notification', { diff --git a/server/lib/notifications/agents/webpush.ts b/server/lib/notifications/agents/webpush.ts index 6af5b2bb..7c72d19d 100644 --- a/server/lib/notifications/agents/webpush.ts +++ b/server/lib/notifications/agents/webpush.ts @@ -185,7 +185,10 @@ class WebPushAgent NotificationAgentKey.WEBPUSH, type ) ?? - true) + true) && + // Check if it's the user's own auto-approved request + (type !== Notification.MEDIA_AUTO_APPROVED || + user.id !== payload.request?.requestedBy.id) ); const allSubs = await userPushSubRepository