Skip to content

Commit

Permalink
Wire up verification cancel & mismatch for rust crypto (#4202)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy authored May 15, 2024
1 parent d76fb2b commit 51fa186
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/rust-crypto/verification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -710,10 +710,16 @@ export class RustSASVerifier extends BaseRustVerifer<RustSdkCryptoJs.Sas> implem
}
},
mismatch: (): void => {
throw new Error("impl");
const request = this.inner.cancelWithCode("m.mismatched_sas");
if (request) {
this.outgoingRequestProcessor.makeOutgoingRequest(request);
}
},
cancel: (): void => {
throw new Error("impl");
const request = this.inner.cancelWithCode("m.user");
if (request) {
this.outgoingRequestProcessor.makeOutgoingRequest(request);
}
},
};
this.emit(VerifierEvent.ShowSas, this.callbacks);
Expand Down

0 comments on commit 51fa186

Please sign in to comment.