From 5c9840daf829eb552f253ca29429884041af20f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Fri, 9 Jul 2021 11:39:25 +0200 Subject: [PATCH] crypto: Return a request when we start QR code verification instead of the content --- matrix_sdk_crypto/src/verification/qrcode.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/matrix_sdk_crypto/src/verification/qrcode.rs b/matrix_sdk_crypto/src/verification/qrcode.rs index 455bec20..605b248c 100644 --- a/matrix_sdk_crypto/src/verification/qrcode.rs +++ b/matrix_sdk_crypto/src/verification/qrcode.rs @@ -245,9 +245,11 @@ impl QrVerification { /// /// This will return some `OutgoingContent` if the object is in the correct /// state to start the verification flow, otherwise `None`. - pub fn reciprocate(&self) -> Option { + pub fn reciprocate(&self) -> Option { match &*self.state.lock().unwrap() { - InnerState::Reciprocated(s) => Some(s.as_content(self.flow_id())), + InnerState::Reciprocated(s) => { + Some(self.content_to_request(s.as_content(self.flow_id()))) + } InnerState::Created(_) | InnerState::Scanned(_) | InnerState::Confirmed(_)