From 50bbc71098aafcd9920c2aa5ec4886570b59822e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 9 Nov 2025 15:03:53 +0000 Subject: [PATCH] Apply code review suggestions - use explicit null checks Co-authored-by: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> --- packages/backend/src/core/NotificationService.ts | 2 +- packages/backend/src/core/entities/NotificationEntityService.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/NotificationService.ts b/packages/backend/src/core/NotificationService.ts index 65d7beb442..c3b9c8163b 100644 --- a/packages/backend/src/core/NotificationService.ts +++ b/packages/backend/src/core/NotificationService.ts @@ -109,7 +109,7 @@ export class NotificationService implements OnApplicationShutdown { const mutings = await this.cacheService.userMutingsCache.fetch(notifieeId); const muting = mutings.get(notifierId); - if (muting && muting.mutingType === 'all') { + if (muting != null && muting.mutingType === 'all') { return null; } diff --git a/packages/backend/src/core/entities/NotificationEntityService.ts b/packages/backend/src/core/entities/NotificationEntityService.ts index bada10c4f4..7e210215e5 100644 --- a/packages/backend/src/core/entities/NotificationEntityService.ts +++ b/packages/backend/src/core/entities/NotificationEntityService.ts @@ -295,7 +295,7 @@ export class NotificationEntityService implements OnModuleInit { ): boolean { if (!('notifierId' in notification)) return true; const muting = userIdsWhoMeMutingMap.get(notification.notifierId); - if (muting && muting.mutingType === 'all') return false; + if (muting != null && muting.mutingType === 'all') return false; const notifier = notifiers.find(x => x.id === notification.notifierId) ?? null;