Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 0f082f7

Browse files
committed
Cypress: crypto.verification.request -> crypto.verificationRequestReceived
matrix-org/matrix-js-sdk#3514 deprecated crypto.verification.request.
1 parent 68b04a8 commit 0f082f7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cypress/e2e/crypto/utils.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@ export type EmojiMapping = [emoji: string, name: string];
2828
export function waitForVerificationRequest(cli: MatrixClient): Promise<VerificationRequest> {
2929
return new Promise<VerificationRequest>((resolve) => {
3030
const onVerificationRequestEvent = async (request: VerificationRequest) => {
31-
// @ts-ignore CryptoEvent is not exported to window.matrixcs; using the string value here
32-
cli.off("crypto.verification.request", onVerificationRequestEvent);
3331
await request.accept();
3432
resolve(request);
3533
};
36-
// @ts-ignore
37-
cli.on("crypto.verification.request", onVerificationRequestEvent);
34+
// @ts-ignore CryptoEvent is not exported to window.matrixcs; using the string value here
35+
cli.once("crypto.verificationRequestReceived", onVerificationRequestEvent);
3836
});
3937
}
4038

0 commit comments

Comments
 (0)