From 823b7c3269067c02504277207a9bfd087ec01c92 Mon Sep 17 00:00:00 2001 From: taichan Date: Tue, 20 Feb 2024 15:40:36 +0900 Subject: [PATCH] Fix condition --- .../backend/src/core/entities/NotificationEntityService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/entities/NotificationEntityService.ts b/packages/backend/src/core/entities/NotificationEntityService.ts index 16451790dd..24ae0bdf3e 100644 --- a/packages/backend/src/core/entities/NotificationEntityService.ts +++ b/packages/backend/src/core/entities/NotificationEntityService.ts @@ -70,7 +70,7 @@ export class NotificationEntityService implements OnModuleInit { ): Promise|null> { const notification = src; - if (options.checkValidNotifier && !(await this.#isValidNotifier(notification, meId))) return null; + if (options.checkValidNotifier !== false && !(await this.#isValidNotifier(notification, meId))) return null; const noteIfNeed = NOTE_REQUIRED_NOTIFICATION_TYPES.has(notification.type) && 'noteId' in notification ? ( hint?.packedNotes != null @@ -170,7 +170,7 @@ export class NotificationEntityService implements OnModuleInit { ): Promise|null> { const notification = src; - if ( options.checkValidNotifier && !(await this.#isValidNotifier(notification, meId))) return null; + if ( options.checkValidNotifier !== false && !(await this.#isValidNotifier(notification, meId))) return null; const noteIfNeed = NOTE_REQUIRED_GROUPED_NOTIFICATION_TYPES.has(notification.type) && 'noteId' in notification ? ( hint?.packedNotes != null