fix: allow logout without push notifications (#856)

zio/stable
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
1 changed files with 3 additions and 0 deletions

View File

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