diff --git a/src/service-worker.js b/src/service-worker.js index 31c27c7d..d2b44488 100644 --- a/src/service-worker.js +++ b/src/service-worker.js @@ -134,10 +134,12 @@ async function showRichNotification (data, notification) { const { icon, body } = data const tag = notification.id const { origin } = self.location + const badge = '/icon-push-badge.png' switch (notification.type) { case 'follow': { await self.registration.showNotification(data.title, { + badge, icon, body, tag, @@ -151,6 +153,7 @@ async function showRichNotification (data, notification) { case 'favourite': case 'poll': await self.registration.showNotification(data.title, { + badge, icon, body, tag, @@ -175,6 +178,7 @@ async function showRichNotification (data, notification) { ].filter(Boolean) await self.registration.showNotification(data.title, { + badge, icon, body, tag, diff --git a/static/icon-push-badge.png b/static/icon-push-badge.png new file mode 100644 index 00000000..557095b8 Binary files /dev/null and b/static/icon-push-badge.png differ