diff --git a/packages/client/src/ui/_common_/common.vue b/packages/client/src/ui/_common_/common.vue index 3cec9b388..c7121d9d0 100644 --- a/packages/client/src/ui/_common_/common.vue +++ b/packages/client/src/ui/_common_/common.vue @@ -33,14 +33,6 @@ const dev: Ref = ref(_DEV_); const onNotification = (notification: { type: string; id: any; }): void => { if ($i?.mutingNotificationTypes.includes(notification.type)) return; - // if push notifications are enabled there is no need to pass the notification along - if (!instance.enableServiceWorker) { - // service worker is not enabled or set up on the server, pass the notification along - navigator.serviceWorker.ready.then(registration => { - registration.active.postMessage({ type: 'notification', body: notification }); - }); - } - sound.play('notification'); }; diff --git a/packages/sw/src/sw.ts b/packages/sw/src/sw.ts index 490c40b30..10cfc69d3 100644 --- a/packages/sw/src/sw.ts +++ b/packages/sw/src/sw.ts @@ -164,9 +164,6 @@ self.addEventListener('message', (ev: ServiceWorkerGlobalScopeEventMap['message' case 'initialize': swLang.setLang(ev.data.lang); break; - case 'notification': - createNotification(ev.data); - break; } } })());