1
0

enhance(backend): push notification for chat message

Resolve #15831
This commit is contained in:
syuilo
2025-04-15 18:27:45 +09:00
parent fff2783c1b
commit fc6037af46
7 changed files with 36 additions and 4 deletions
+4
View File
@@ -76,6 +76,7 @@ globalThis.addEventListener('push', ev => {
// case 'driveFileCreated':
case 'notification':
case 'unreadAntennaNote':
case 'newChatMessage':
// 1日以上経過している場合は無視
if (Date.now() - data.dateTime > 1000 * 60 * 60 * 24) break;
@@ -155,6 +156,9 @@ globalThis.addEventListener('notificationclick', (ev: ServiceWorkerGlobalScopeEv
case 'unreadAntennaNote':
client = await swos.openAntenna(data.body.antenna.id, loginId);
break;
case 'newChatMessage':
client = await swos.openChat(data.body, loginId);
break;
default:
switch (action) {
case 'markAllAsRead':