From f9fb530480d1c9cb8608aac2eb52ad75c3f5c074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Fri, 4 Jun 2021 16:22:37 +0200 Subject: [PATCH] crypto: Forward cancel events to the sas object --- matrix_sdk_crypto/src/verification/machine.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matrix_sdk_crypto/src/verification/machine.rs b/matrix_sdk_crypto/src/verification/machine.rs index bb3b653f..275d9780 100644 --- a/matrix_sdk_crypto/src/verification/machine.rs +++ b/matrix_sdk_crypto/src/verification/machine.rs @@ -287,7 +287,10 @@ impl VerificationMachine { self.requests.insert(request.flow_id().as_str().to_owned(), request); } AnyVerificationContent::Cancel(_) => { - todo!() + if let Some(sas) = self.verifications.get_sas(flow_id.as_str()) { + // This won't produce an outgoing content + let _ = sas.receive_any_event(event.sender(), &content); + } } AnyVerificationContent::Ready(c) => { if let Some(request) = self.requests.get(flow_id.as_str()) {