fix: add badge and tag to simple push notifications (#2299)
This commit is contained in:
parent
380d2a0d45
commit
d31c800806
|
@ -185,8 +185,10 @@ self.addEventListener('push', event => {
|
||||||
|
|
||||||
async function showSimpleNotification (data) {
|
async function showSimpleNotification (data) {
|
||||||
await self.registration.showNotification(data.title, {
|
await self.registration.showNotification(data.title, {
|
||||||
|
badge: '/icon-push-badge.png',
|
||||||
icon: data.icon,
|
icon: data.icon,
|
||||||
body: data.body,
|
body: data.body,
|
||||||
|
tag: data.notification_id,
|
||||||
data: {
|
data: {
|
||||||
url: `${self.origin}/notifications`
|
url: `${self.origin}/notifications`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue