crypto: Add the verification to the cache after we scan a QR code
parent
5c9840daf8
commit
76d57baa11
|
@ -947,7 +947,8 @@ mod test {
|
|||
.await
|
||||
.unwrap();
|
||||
|
||||
let content = bob_verification.reciprocate().unwrap();
|
||||
let request = bob_verification.reciprocate().unwrap();
|
||||
let content = OutgoingContent::from(request);
|
||||
let content = StartContent::try_from(&content).unwrap();
|
||||
|
||||
alice_verification.receive_reciprocation(&content);
|
||||
|
|
|
@ -271,8 +271,7 @@ impl VerificationRequest {
|
|||
let state = self.inner.lock().unwrap();
|
||||
|
||||
if let InnerRequest::Ready(r) = &*state {
|
||||
Ok(Some(
|
||||
QrVerification::from_scan(
|
||||
let qr_verification = QrVerification::from_scan(
|
||||
r.store.clone(),
|
||||
r.account.clone(),
|
||||
r.private_cross_signing_identity.clone(),
|
||||
|
@ -282,8 +281,11 @@ impl VerificationRequest {
|
|||
data,
|
||||
self.we_started,
|
||||
)
|
||||
.await?,
|
||||
))
|
||||
.await?;
|
||||
|
||||
self.verification_cache.insert_qr(qr_verification.clone());
|
||||
|
||||
Ok(Some(qr_verification))
|
||||
} else {
|
||||
Ok(None)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue