fix: add badge and tag to simple push notifications (#2299)

This commit is contained in:
Thomas Broyer 2022-12-09 17:22:36 +01:00 committed by GitHub
parent 380d2a0d45
commit d31c800806
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -185,8 +185,10 @@ self.addEventListener('push', event => {
async function showSimpleNotification (data) {
await self.registration.showNotification(data.title, {
badge: '/icon-push-badge.png',
icon: data.icon,
body: data.body,
tag: data.notification_id,
data: {
url: `${self.origin}/notifications`
}