Merge pull request #4443 from vector-im/element_3695

NSE: Fix Usage of Old Credentials
This commit is contained in:
ismailgulek
2021-06-21 11:09:06 +03:00
committed by GitHub
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -24,6 +24,7 @@ Changes to be released in next version
* VoIP: Handle application inactive state too for VoIP pushes (#4269).
* VoIP: Do not terminate the app if protected data not available (#4419).
* KeyVerification: Listen for request state changes and show QR reader option when it's ready.
* NSE: Recreate background sync service if credentials changed (#3695).
⚠️ API Changes
*
+1 -1
View File
@@ -163,7 +163,7 @@ class NotificationService: UNNotificationServiceExtension {
MXKAccountManager.shared()?.forceReloadAccounts()
self.userAccount = MXKAccountManager.shared()?.activeAccounts.first
if let userAccount = userAccount {
if NotificationService.backgroundSyncService == nil {
if NotificationService.backgroundSyncService?.credentials != userAccount.mxCredentials {
MXLog.debug("[NotificationService] setup: MXBackgroundSyncService init: BEFORE")
self.logMemory()
NotificationService.backgroundSyncService = MXBackgroundSyncService(withCredentials: userAccount.mxCredentials)