mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Session verification fixes and bump SDK to v0.0.1-october23 (#1954)
* Fixes vector-im/element-x-ios/issues/1868 Incorrect `is_verified` flag after successfully running verification flow - the inner user_identity isn't automatically updated when the flow finishes, needs to be fetched again from encryption - also replaces `UserIdentity.is_verified` with `Device.is_cross_signed_by_owner` - depends on matrix-org/matrix-rust-sdk/pull/2775 --------- Co-authored-by: Doug <douglase@element.io>
This commit is contained in:
+7
-2
@@ -65,8 +65,13 @@ class SessionVerificationControllerProxy: SessionVerificationControllerProxyProt
|
||||
|
||||
let callbacks = PassthroughSubject<SessionVerificationControllerProxyCallback, Never>()
|
||||
|
||||
var isVerified: Bool {
|
||||
sessionVerificationController.isVerified()
|
||||
func isVerified() async -> Result<Bool, SessionVerificationControllerProxyError> {
|
||||
do {
|
||||
let result = try await sessionVerificationController.isVerified()
|
||||
return .success(result)
|
||||
} catch {
|
||||
return .failure(.failedCheckingVerificationState)
|
||||
}
|
||||
}
|
||||
|
||||
func requestVerification() async -> Result<Void, SessionVerificationControllerProxyError> {
|
||||
|
||||
+2
-1
@@ -18,6 +18,7 @@ import Combine
|
||||
import Foundation
|
||||
|
||||
enum SessionVerificationControllerProxyError: Error {
|
||||
case failedCheckingVerificationState
|
||||
case failedRequestingVerification
|
||||
case failedStartingSasVerification
|
||||
case failedApprovingVerification
|
||||
@@ -43,7 +44,7 @@ struct SessionVerificationEmoji: Hashable {
|
||||
protocol SessionVerificationControllerProxyProtocol {
|
||||
var callbacks: PassthroughSubject<SessionVerificationControllerProxyCallback, Never> { get }
|
||||
|
||||
var isVerified: Bool { get }
|
||||
func isVerified() async -> Result<Bool, SessionVerificationControllerProxyError>
|
||||
|
||||
func requestVerification() async -> Result<Void, SessionVerificationControllerProxyError>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user