mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-07-05 10:34:43 +02:00
Remove web-push-(enabled|duration*), change endpoint, other cosmetic changes
This commit is contained in:
parent
4ce6fdcc5a
commit
d3ac976d05
17 changed files with 55 additions and 101 deletions
web/src/app
|
@ -52,17 +52,14 @@ class Notifier {
|
|||
if (!this.pushPossible()) {
|
||||
throw new Error("Unsupported or denied");
|
||||
}
|
||||
|
||||
const pushManager = await this.pushManager();
|
||||
|
||||
const existingSubscription = await pushManager.getSubscription();
|
||||
|
||||
if (existingSubscription) {
|
||||
return existingSubscription;
|
||||
}
|
||||
|
||||
// create a new subscription only if web push is enabled
|
||||
// it is possible that web push was previously enabled and then disabled again
|
||||
// Create a new subscription only if web push is enabled.
|
||||
// It is possible that web push was previously enabled and then disabled again
|
||||
// in which case there would be an existingSubscription.
|
||||
// but if it was _not_ enabled previously, we reach here, and only create a new
|
||||
// subscription if it is now enabled.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue