Skip to content

Commit

Permalink
fixes #7217; Allows "MESSAGE" type push notifications to show notific…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
rithviknishad committed Feb 15, 2024
1 parent d36c0f2 commit 7eb94b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/service-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ self.addEventListener("push", async function (event) {
if (event.data) {
const data = JSON.parse(event.data.text());

if (["MESSAGE", "PUSH_MESSAGE"].includes(data?.type)) {
if (["PUSH_MESSAGE"].includes(data?.type)) {
self.clients.matchAll().then((clients) => {
clients[0].postMessage(data);
});
Expand Down

0 comments on commit 7eb94b9

Please sign in to comment.