summaryrefslogtreecommitdiff
path: root/ui/service-worker.js
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2026-02-27 16:41:37 -0500
committerOwen Jacobson <owen@grimoire.ca>2026-02-27 18:15:33 -0500
commitb32c7682f0a84619a6d1845516a6a1829fa0c59b (patch)
treefad8bf5bd8eb628253611f0b3d1a91febe3b9266 /ui/service-worker.js
parent6ab0f42250294e38e8da6a48260ff83544a6be9a (diff)
Move failed push handling inside of the web push publisher.HEADmain
I want push publication to be "fire and forget," and ultimately also for it to be asynchronous and retriable. To facilitate that, the caller needs to be insulated from the final outcome of publishing a push message. I've opted to preserve the `Failure` possibility, but any delivery issues are now handled inside the publisher.
Diffstat (limited to 'ui/service-worker.js')
-rw-r--r--ui/service-worker.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/service-worker.js b/ui/service-worker.js
index 81d0752..8a889ec 100644
--- a/ui/service-worker.js
+++ b/ui/service-worker.js
@@ -27,6 +27,7 @@ function countUnreadChannels() {
self.addEventListener('push', (event) => {
const data = event.data.json();
+
if (data.type === 'heartbeat') {
// Let's show a notification right away so Safari doesn't tell Apple to be
// mad at us: