From 6993e7a394563e3ac06e7529ddc3f652130e09dc Mon Sep 17 00:00:00 2001 From: Ashesh <3626859+Ashesh3@users.noreply.github.com> Date: Tue, 31 Oct 2023 15:01:25 +0530 Subject: [PATCH] Update service-worker.ts --- src/service-worker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service-worker.ts b/src/service-worker.ts index d52bee0a084..b1ec509aaab 100644 --- a/src/service-worker.ts +++ b/src/service-worker.ts @@ -105,7 +105,7 @@ self.addEventListener("push", async function (event) { if (event.data) { const data = JSON.parse(event.data.text()); - if (data?.type === "MESSAGE") { + if (["MESSAGE","PUSH_MESSAGE"].includes(data?.type)) { self.clients.matchAll().then((clients) => { clients[0].postMessage(data); });