crypto: Fix verification requests getting cancelled

master
Damir Jelić 2021-06-28 15:27:01 +02:00
parent 100a936f1b
commit 63659c9604
1 changed files with 7 additions and 2 deletions

View File

@ -436,7 +436,12 @@ impl VerificationRequest {
pub(crate) fn receive_cancel(&self, sender: &UserId, content: &CancelContent<'_>) { pub(crate) fn receive_cancel(&self, sender: &UserId, content: &CancelContent<'_>) {
if sender == self.other_user() { if sender == self.other_user() {
let mut inner = self.inner.lock().unwrap().clone(); trace!(
sender = sender.as_str(),
code = content.cancel_code().as_str(),
"Cancelling a verification request, other user has cancelled"
);
let mut inner = self.inner.lock().unwrap();
inner.cancel(false, content.cancel_code()); inner.cancel(false, content.cancel_code());
} }
} }
@ -548,7 +553,7 @@ impl InnerRequest {
InnerRequest::Passive(s) => s.clone().into_canceled(cancelled_by_us, cancel_code), InnerRequest::Passive(s) => s.clone().into_canceled(cancelled_by_us, cancel_code),
InnerRequest::Done(_) => return, InnerRequest::Done(_) => return,
InnerRequest::Cancelled(_) => return, InnerRequest::Cancelled(_) => return,
}) });
} }
async fn generate_qr_code( async fn generate_qr_code(