Skip to content

Commit 0e4057f

Browse files
committed
Do not drop requests after receiving mac if sas is not complete
When during verification we are the first party to complete the verification workflow and then receive a (correct) MAC from the other party, we need to send out the Done message even if we have not received the Done message from the other party ourselves and are thus still "WaitingForDone".
1 parent c79e62d commit 0e4057f

File tree

1 file changed

+12
-0
lines changed
  • crates/matrix-sdk-crypto/src/verification

1 file changed

+12
-0
lines changed

crates/matrix-sdk-crypto/src/verification/machine.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,18 @@ impl VerificationMachine {
471471

472472
if s.is_done() {
473473
self.mark_sas_as_done(s, content).await?;
474+
} else {
475+
// Even if we are not done (yet), there might be content to send
476+
// out, e.g. in the case where we are done with our side of the
477+
// verification process, but the other side has not yet sent their
478+
// "done".
479+
if let Some(content) = content {
480+
self.queue_up_content(
481+
s.other_user_id(),
482+
s.other_device_id(),
483+
content,
484+
);
485+
}
474486
}
475487
} else {
476488
flow_id_mismatch();

0 commit comments

Comments
 (0)