diff options
Diffstat (limited to 'packages/backend/src/core/NoteReadService.ts')
| -rw-r--r-- | packages/backend/src/core/NoteReadService.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/backend/src/core/NoteReadService.ts b/packages/backend/src/core/NoteReadService.ts index f70495ff30..82825b8b15 100644 --- a/packages/backend/src/core/NoteReadService.ts +++ b/packages/backend/src/core/NoteReadService.ts @@ -12,6 +12,7 @@ import { UserEntityService } from '@/core/entities/UserEntityService.js'; import { NotificationService } from './NotificationService.js'; import { AntennaService } from './AntennaService.js'; import { bindThis } from '@/decorators.js'; +import { PushNotificationService } from './PushNotificationService.js'; @Injectable() export class NoteReadService { @@ -42,6 +43,7 @@ export class NoteReadService { private globalEventServie: GlobalEventService, private notificationService: NotificationService, private antennaService: AntennaService, + private pushNotificationService: PushNotificationService, ) { } @@ -205,12 +207,14 @@ export class NoteReadService { if (count === 0) { this.globalEventServie.publishMainStream(userId, 'readAntenna', antenna); + this.pushNotificationService.pushNotification(userId, 'readAntenna', { antennaId: antenna.id }); } } this.userEntityService.getHasUnreadAntenna(userId).then(unread => { if (!unread) { this.globalEventServie.publishMainStream(userId, 'readAllAntennas'); + this.pushNotificationService.pushNotification(userId, 'readAllAntennas', undefined); } }); } |