Compare commits
2 Commits
hide_prelo
...
update_sub
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
357449c1c6 | ||
|
|
de70522850 |
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
define('PWA_VERSION', '1.10.3h1');
|
||||
define('PWA_VERSION', '1.10.3h2');
|
||||
|
||||
?>
|
||||
|
||||
@@ -311,3 +311,16 @@ self.addEventListener('notificationclick', function(event) {
|
||||
clients.openWindow(url)
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener('pushsubscriptionchange', function(event) {
|
||||
var formData = new URLSearchParams();
|
||||
formData.append('old', JSON.stringify(event.oldSubscription));
|
||||
formData.append('new', JSON.stringify(event.newSubscription));
|
||||
event.waitUntil(
|
||||
fetch('<?php echo QUERY_URL; ?>update_subscription', {
|
||||
method: 'POST',
|
||||
cache: 'no-cache',
|
||||
body: formData
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user