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

This commit is contained in:
Damir Jelić 2021-07-09 11:39:25 +02:00
parent ae37e6ec9d
commit 5c9840daf8

View file

@ -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<OutgoingContent> {
pub fn reciprocate(&self) -> Option<OutgoingVerificationRequest> {
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(_)