Snapshot of main at 9f39a6e1e (2026-11-02)

This commit is contained in:
Ronald Huynen committed 2026-11-02 10:41:47 +01:00
commit 6ccf1792d7
2580 files changed
+1040202

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
self.addEventListener('message', event => {
if (event.data.type === 'SHOW_NOTIFICATION') {
event.waitUntil(
self.registration.showNotification(event.data.title, event.data.options)
.catch(error => {
})
);
}
if (event.data.type === 'CLOSE_NOTIFICATION') {
event.waitUntil(
self.registration.getNotifications({ tag: event.data.tag })
.then(notifications => {
notifications.forEach(notification => notification.close());
})
.catch(error => {
})
);
}
});
self.addEventListener('notificationclick', event => {
event.notification.close();
if (event.notification.data && event.notification.data.url) {
const windowName='wirechat-conversation';
event.waitUntil(clients.openWindow(event.notification.data.url,windowName));
}
});