diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-04-15 18:27:45 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-04-15 18:27:45 +0900 |
| commit | fc6037af461412d914cd35a00fa004ad26d19c0f (patch) | |
| tree | 8551e0789e2a68a8a3ce05e3253a32d0fbcc86c8 /packages/backend/src/core | |
| parent | docs: バックアップとログアウトの設定クリアについて書... (diff) | |
| download | sharkey-fc6037af461412d914cd35a00fa004ad26d19c0f.tar.gz sharkey-fc6037af461412d914cd35a00fa004ad26d19c0f.tar.bz2 sharkey-fc6037af461412d914cd35a00fa004ad26d19c0f.zip | |
enhance(backend): push notification for chat message
Resolve #15831
Diffstat (limited to 'packages/backend/src/core')
| -rw-r--r-- | packages/backend/src/core/ChatService.ts | 4 | ||||
| -rw-r--r-- | packages/backend/src/core/PushNotificationService.ts | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/packages/backend/src/core/ChatService.ts b/packages/backend/src/core/ChatService.ts index b0e8cfb61c..9d294a80cb 100644 --- a/packages/backend/src/core/ChatService.ts +++ b/packages/backend/src/core/ChatService.ts @@ -232,7 +232,7 @@ export class ChatService { const packedMessageForTo = await this.chatEntityService.packMessageDetailed(inserted, toUser); this.globalEventService.publishMainStream(toUser.id, 'newChatMessage', packedMessageForTo); - //this.pushNotificationService.pushNotification(toUser.id, 'newChatMessage', packedMessageForTo); + this.pushNotificationService.pushNotification(toUser.id, 'newChatMessage', packedMessageForTo); }, 3000); } @@ -302,7 +302,7 @@ export class ChatService { if (marker == null) continue; this.globalEventService.publishMainStream(membershipsOtherThanMe[i].userId, 'newChatMessage', packedMessageForTo); - //this.pushNotificationService.pushNotification(membershipsOtherThanMe[i].userId, 'newChatMessage', packedMessageForTo); + this.pushNotificationService.pushNotification(membershipsOtherThanMe[i].userId, 'newChatMessage', packedMessageForTo); } }, 3000); diff --git a/packages/backend/src/core/PushNotificationService.ts b/packages/backend/src/core/PushNotificationService.ts index 1479bb00d9..9333c1ebc5 100644 --- a/packages/backend/src/core/PushNotificationService.ts +++ b/packages/backend/src/core/PushNotificationService.ts @@ -22,6 +22,7 @@ type PushNotificationsTypes = { note: Packed<'Note'>; }; 'readAllNotifications': undefined; + newChatMessage: Packed<'ChatMessage'>; }; // Reduce length because push message servers have character limits |