Skip to content

Commit 51fa186

Browse files
authored
Wire up verification cancel & mismatch for rust crypto (#4202)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
1 parent d76fb2b commit 51fa186

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/rust-crypto/verification.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,10 +710,16 @@ export class RustSASVerifier extends BaseRustVerifer<RustSdkCryptoJs.Sas> implem
710710
}
711711
},
712712
mismatch: (): void => {
713-
throw new Error("impl");
713+
const request = this.inner.cancelWithCode("m.mismatched_sas");
714+
if (request) {
715+
this.outgoingRequestProcessor.makeOutgoingRequest(request);
716+
}
714717
},
715718
cancel: (): void => {
716-
throw new Error("impl");
719+
const request = this.inner.cancelWithCode("m.user");
720+
if (request) {
721+
this.outgoingRequestProcessor.makeOutgoingRequest(request);
722+
}
717723
},
718724
};
719725
this.emit(VerifierEvent.ShowSas, this.callbacks);

0 commit comments

Comments
 (0)