mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-05 00:19:59 +00:00
fix: skip removal of notifications if pwa not enabled
This commit is contained in:
parent
f0c91a3974
commit
80ad2ab607
1 changed files with 3 additions and 0 deletions
|
@ -96,6 +96,9 @@ export async function loginTo(user?: Omit<UserLogin, 'account'> & { account?: Ac
|
|||
}
|
||||
|
||||
export async function removePushNotifications(user: UserLogin, fromSWPushManager = true) {
|
||||
if (!useRuntimeConfig().public.pwaEnabled || !user.pushSubscription)
|
||||
return
|
||||
|
||||
// unsubscribe push notifications
|
||||
try {
|
||||
await useMasto().pushSubscriptions.remove()
|
||||
|
|
Loading…
Reference in a new issue