From fe09eae6599c93d8d5bf0a398d11897508e2f1a4 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 22 Oct 2024 00:04:17 -0700 Subject: get push subscription --- src/routes/(app)/settings/[...tab]/_pos.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/routes') diff --git a/src/routes/(app)/settings/[...tab]/_pos.svelte b/src/routes/(app)/settings/[...tab]/_pos.svelte index 37be6fe7..8cff4b1f 100644 --- a/src/routes/(app)/settings/[...tab]/_pos.svelte +++ b/src/routes/(app)/settings/[...tab]/_pos.svelte @@ -70,7 +70,7 @@ return post("/subscription/delete", { subscription }); } - if (push && permission === "prompt") { + if (push && permission !== "denied") { subscription = await pm.subscribe({ userVisibleOnly: true, applicationServerKey: PUBLIC_VAPID_PUBKEY, -- cgit v1.2.3