mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-05 22:57:40 +03:00
Fix iOS having notification token revoked
This commit is contained in:
parent
573a5ede62
commit
fb4b37c337
@ -19,16 +19,20 @@ self.addEventListener("push", function (event) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-expect-error we know this exists
|
// event.waitUntil is required on iOS Safari — without it, the browser
|
||||||
self.registration.showNotification(data.title, {
|
// may consider this a "silent push" and revoke the subscription after 3 occurrences.
|
||||||
body: data.message,
|
event.waitUntil(
|
||||||
icon: "/images/maskable-icon.png",
|
// @ts-expect-error we know this exists
|
||||||
image: data.image,
|
self.registration.showNotification(data.title, {
|
||||||
badge: "/images/maskable-badge.png",
|
body: data.message,
|
||||||
tag: data.id,
|
icon: "/images/maskable-icon.png",
|
||||||
data: { id: data.id, link: data.direct_url },
|
image: data.image,
|
||||||
actions,
|
badge: "/images/maskable-badge.png",
|
||||||
});
|
tag: data.id,
|
||||||
|
data: { id: data.id, link: data.direct_url },
|
||||||
|
actions,
|
||||||
|
}), // eslint-disable-line comma-dangle
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
// pass
|
// pass
|
||||||
// This push event has no data
|
// This push event has no data
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user