From 6b4315409461fc4cedcd233afbdfd12d3a6e3f0e Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Sun, 10 Sep 2023 18:59:10 +0900 Subject: [PATCH] =?UTF-8?q?globalEvent=E3=81=AE=E5=90=8D=E5=89=8D=E3=82=92?= =?UTF-8?q?=E6=98=8E=E7=A2=BA=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/scripts/test-notification.ts | 2 +- packages/frontend/src/ui/_common_/common.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/scripts/test-notification.ts b/packages/frontend/src/scripts/test-notification.ts index c36fe9d197..0e8289e19e 100644 --- a/packages/frontend/src/scripts/test-notification.ts +++ b/packages/frontend/src/scripts/test-notification.ts @@ -28,7 +28,7 @@ export function testNotification(type: 'client' | 'server'): void { os.api('notifications/test-notification'); break; case 'client': - globalEvents.emit('notification', notification); + globalEvents.emit('clientNotification', notification); break; } } diff --git a/packages/frontend/src/ui/_common_/common.vue b/packages/frontend/src/ui/_common_/common.vue index 86b028b565..65c5dbb384 100644 --- a/packages/frontend/src/ui/_common_/common.vue +++ b/packages/frontend/src/ui/_common_/common.vue @@ -89,7 +89,7 @@ function onNotification(notification: Misskey.entities.Notification, isClient: b if ($i) { const connection = useStream().useChannel('main', null, 'UI'); connection.on('notification', onNotification); - globalEvents.on('notification', notification => onNotification(notification, true)); + globalEvents.on('clientNotification', notification => onNotification(notification, true)); //#region Listen message from SW if ('serviceWorker' in navigator) {