mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Enable database encryption for new logins on Nightly/PR builds. (#2328)
- Slightly reworks where the pusher client ID is generated.
This commit is contained in:
@@ -113,7 +113,14 @@ class KeychainController: KeychainControllerProtocol {
|
||||
|
||||
func saveSessionInKeychain(session: Session) {
|
||||
MXLog.info("Saving session changes in the keychain.")
|
||||
let restorationToken = RestorationToken(session: session)
|
||||
|
||||
guard let oldToken = restorationTokenForUsername(session.userId) else {
|
||||
MXLog.error("Failed retrieving the restoration token for \(session.userId)")
|
||||
fatalError("Something has gone mega wrong, all bets are off.")
|
||||
}
|
||||
let restorationToken = RestorationToken(session: session,
|
||||
passphrase: oldToken.passphrase,
|
||||
pusherNotificationClientIdentifier: oldToken.pusherNotificationClientIdentifier)
|
||||
setRestorationToken(restorationToken, forUsername: session.userId)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user