crypto: Add the verification to the cache after we scan a QR code
parent
5c9840daf8
commit
76d57baa11
|
@ -947,7 +947,8 @@ mod test {
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.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();
|
let content = StartContent::try_from(&content).unwrap();
|
||||||
|
|
||||||
alice_verification.receive_reciprocation(&content);
|
alice_verification.receive_reciprocation(&content);
|
||||||
|
|
|
@ -271,19 +271,21 @@ impl VerificationRequest {
|
||||||
let state = self.inner.lock().unwrap();
|
let state = self.inner.lock().unwrap();
|
||||||
|
|
||||||
if let InnerRequest::Ready(r) = &*state {
|
if let InnerRequest::Ready(r) = &*state {
|
||||||
Ok(Some(
|
let qr_verification = QrVerification::from_scan(
|
||||||
QrVerification::from_scan(
|
r.store.clone(),
|
||||||
r.store.clone(),
|
r.account.clone(),
|
||||||
r.account.clone(),
|
r.private_cross_signing_identity.clone(),
|
||||||
r.private_cross_signing_identity.clone(),
|
r.other_user_id.clone(),
|
||||||
r.other_user_id.clone(),
|
r.state.other_device_id.clone(),
|
||||||
r.state.other_device_id.clone(),
|
r.flow_id.as_ref().to_owned(),
|
||||||
r.flow_id.as_ref().to_owned(),
|
data,
|
||||||
data,
|
self.we_started,
|
||||||
self.we_started,
|
)
|
||||||
)
|
.await?;
|
||||||
.await?,
|
|
||||||
))
|
self.verification_cache.insert_qr(qr_verification.clone());
|
||||||
|
|
||||||
|
Ok(Some(qr_verification))
|
||||||
} else {
|
} else {
|
||||||
Ok(None)
|
Ok(None)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue