1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-05 00:19:59 +00:00

fix: allow logout without push notifications (#856)

This commit is contained in:
Daniel Roe 2023-01-07 10:36:21 -08:00 committed by GitHub
parent 0bf76fdf86
commit 31ae413da4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -183,6 +183,9 @@ export function getUsersIndexByUserId(userId: string) {
} }
export async function removePushNotificationData(user: UserLogin, fromSWPushManager = true) { export async function removePushNotificationData(user: UserLogin, fromSWPushManager = true) {
if (!user.pushSubscription)
return
// clear push subscription // clear push subscription
user.pushSubscription = undefined user.pushSubscription = undefined
const { acct } = user.account const { acct } = user.account