diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-09-19 03:11:50 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-09-19 03:11:50 +0900 |
| commit | a2eac9fff67f811ed4ac1a80a88fd1f0eafae6c8 (patch) | |
| tree | 9c7190e05fe0ffe085646cd194c6c65d47375f83 /packages/backend/src/core/NotificationService.ts | |
| parent | revert (diff) | |
| download | sharkey-a2eac9fff67f811ed4ac1a80a88fd1f0eafae6c8.tar.gz sharkey-a2eac9fff67f811ed4ac1a80a88fd1f0eafae6c8.tar.bz2 sharkey-a2eac9fff67f811ed4ac1a80a88fd1f0eafae6c8.zip | |
test
Diffstat (limited to 'packages/backend/src/core/NotificationService.ts')
| -rw-r--r-- | packages/backend/src/core/NotificationService.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/backend/src/core/NotificationService.ts b/packages/backend/src/core/NotificationService.ts index 44957d62d3..ca9e60889d 100644 --- a/packages/backend/src/core/NotificationService.ts +++ b/packages/backend/src/core/NotificationService.ts @@ -38,8 +38,8 @@ export class NotificationService { if (result.affected === 0) return; - if (!await this.userEntityService.getHasUnreadNotification(userId)) return this.#postReadAllNotifications(userId); - else return this.#postReadNotifications(userId, notificationIds); + if (!await this.userEntityService.getHasUnreadNotification(userId)) return this.postReadAllNotifications(userId); + else return this.postReadNotifications(userId, notificationIds); } public async readNotificationByQuery( @@ -55,12 +55,12 @@ export class NotificationService { return this.readNotification(userId, notificationIds); } - #postReadAllNotifications(userId: User['id']) { + private postReadAllNotifications(userId: User['id']) { this.globalEventService.publishMainStream(userId, 'readAllNotifications'); return this.pushNotificationService.pushNotification(userId, 'readAllNotifications', undefined); } - #postReadNotifications(userId: User['id'], notificationIds: Notification['id'][]) { + private postReadNotifications(userId: User['id'], notificationIds: Notification['id'][]) { this.globalEventService.publishMainStream(userId, 'readNotifications', notificationIds); return this.pushNotificationService.pushNotification(userId, 'readNotifications', { notificationIds }); } |