Move verification request acceptance confirmation to method call response instead of delegate callback

This because the Rust side verification state machine doesn't wait for the request
to be sent and acknowledged before changing its inner state and with the automatic
starting of SAS in https://github.com/element-hq/element-x-ios/pull/5116 that creates
race conditions between `m.key.verification.ready` and `m.key.verification.start`.
This commit is contained in:
Stefan Ceriu
2026-05-05 13:00:52 +03:00
parent 680a9a587c
commit 5e95bd6531
2 changed files with 10 additions and 4 deletions
@@ -166,7 +166,8 @@ class SessionVerificationScreenViewModel: SessionVerificationViewModelType, Sess
switch await sessionVerificationControllerProxy.acceptVerificationRequest() {
case .success:
stateMachine.processEvent(.didAcceptVerificationRequest)
// Need to wait for the callback from the remote
break
case .failure:
stateMachine.processEvent(.didFail)
}