crypto: Cancel the verification request for to-device Sas verifications

This commit is contained in:
Damir Jelić 2021-07-19 09:32:48 +02:00
parent 7433003ffa
commit 909cd42ac1
4 changed files with 7 additions and 2 deletions

View file

@ -43,7 +43,7 @@ use crate::{
olm::{InboundGroupSession, PrivateCrossSigningIdentity, Session, Utility},
store::{Changes, CryptoStore, DeviceChanges, Result as StoreResult},
verification::VerificationMachine,
OutgoingVerificationRequest, Sas, ToDeviceRequest, VerificationRequest,
OutgoingVerificationRequest, Sas, ToDeviceRequest,
};
#[cfg(test)]
use crate::{OlmMachine, ReadOnlyAccount};

View file

@ -142,6 +142,7 @@ impl VerificationMachine {
identity,
None,
true,
None,
);
let request = match content {
@ -565,6 +566,7 @@ mod test {
None,
None,
true,
None,
);
machine

View file

@ -1172,6 +1172,7 @@ impl RequestState<Ready> {
other_identity,
Some(t.to_owned()),
we_started,
Some(request_handle),
);
(sas, content)
}

View file

@ -195,6 +195,7 @@ impl Sas {
other_identity: Option<ReadOnlyUserIdentities>,
transaction_id: Option<String>,
we_started: bool,
request_handle: Option<RequestHandle>,
) -> (Sas, OutgoingContent) {
let (inner, content) = InnerSas::start(
account.clone(),
@ -212,7 +213,7 @@ impl Sas {
store,
other_identity,
we_started,
None,
request_handle,
),
content,
)
@ -627,6 +628,7 @@ mod test {
None,
None,
true,
None,
);
let flow_id = alice.flow_id().to_owned();