mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-28 04:06:57 +02:00
User verification: Check cross-signing bootstrap before start.
This commit is contained in:
@@ -62,6 +62,11 @@ final class UserVerificationCoordinator: NSObject, UserVerificationCoordinatorTy
|
||||
return
|
||||
}
|
||||
|
||||
guard self.session.crypto.crossSigning.isBootstrapped else {
|
||||
self.presentBootstrapNotSetup()
|
||||
return
|
||||
}
|
||||
|
||||
let rootCoordinator: Coordinator & Presentable
|
||||
|
||||
if let deviceId = self.deviceId {
|
||||
@@ -123,6 +128,18 @@ final class UserVerificationCoordinator: NSObject, UserVerificationCoordinatorTy
|
||||
self.remove(childCoordinator: deviceVerificationCoordinator)
|
||||
})
|
||||
}
|
||||
|
||||
private func presentBootstrapNotSetup() {
|
||||
let alert = UIAlertController(title: VectorL10n.keyVerificationBootstrapNotSetupTitle,
|
||||
message: VectorL10n.keyVerificationBootstrapNotSetupMessage,
|
||||
preferredStyle: .alert)
|
||||
|
||||
let cancelAction = UIAlertAction(title: Bundle.mxk_localizedString(forKey: "ok"), style: .cancel, handler: { _ in
|
||||
})
|
||||
alert.addAction(cancelAction)
|
||||
|
||||
self.presenter.toPresentable().present(alert, animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - UserVerificationSessionsStatusCoordinatorDelegate
|
||||
|
||||
Reference in New Issue
Block a user