Fixes #1619 - Remove push notification registration on logout

This commit is contained in:
Stefan Ceriu
2023-11-13 10:31:45 +02:00
committed by Stefan Ceriu
parent ab1c7c1c9a
commit 259baeaf99
2 changed files with 4 additions and 1 deletions
@@ -527,11 +527,13 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
return
}
// The user will log out, clear any existing notifications
// The user will log out, clear any existing notifications and unregister from receving new ones
UNUserNotificationCenter.current().removeAllPendingNotificationRequests()
UNUserNotificationCenter.current().removeAllDeliveredNotifications()
UIApplication.shared.applicationIconBadgeNumber = 0
unregisterForRemoteNotifications()
Task {
// First log out from the server
let accountLogoutURL = await userSession.clientProxy.logout()
+1
View File
@@ -0,0 +1 @@
Remove push notification registration on logout