crypto: Return a request when we start QR code verification instead of the content

master
Damir Jelić 2021-07-09 11:39:25 +02:00
parent ae37e6ec9d
commit 5c9840daf8
1 changed files with 4 additions and 2 deletions

View File

@ -245,9 +245,11 @@ impl QrVerification {
/// ///
/// This will return some `OutgoingContent` if the object is in the correct /// This will return some `OutgoingContent` if the object is in the correct
/// state to start the verification flow, otherwise `None`. /// state to start the verification flow, otherwise `None`.
pub fn reciprocate(&self) -> Option<OutgoingContent> { pub fn reciprocate(&self) -> Option<OutgoingVerificationRequest> {
match &*self.state.lock().unwrap() { 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::Created(_)
| InnerState::Scanned(_) | InnerState::Scanned(_)
| InnerState::Confirmed(_) | InnerState::Confirmed(_)