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

Commit

Permalink
Cypress: crypto.verification.request -> `crypto.verificationRequest…
Browse files Browse the repository at this point in the history
…Received`

matrix-org/matrix-js-sdk#3514 deprecated crypto.verification.request.
  • Loading branch information
richvdh committed Jul 3, 2023
1 parent 68b04a8 commit 0f082f7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cypress/e2e/crypto/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ export type EmojiMapping = [emoji: string, name: string];
export function waitForVerificationRequest(cli: MatrixClient): Promise<VerificationRequest> {
return new Promise<VerificationRequest>((resolve) => {
const onVerificationRequestEvent = async (request: VerificationRequest) => {
// @ts-ignore CryptoEvent is not exported to window.matrixcs; using the string value here
cli.off("crypto.verification.request", onVerificationRequestEvent);
await request.accept();
resolve(request);
};
// @ts-ignore
cli.on("crypto.verification.request", onVerificationRequestEvent);
// @ts-ignore CryptoEvent is not exported to window.matrixcs; using the string value here
cli.once("crypto.verificationRequestReceived", onVerificationRequestEvent);
});
}

Expand Down

0 comments on commit 0f082f7

Please sign in to comment.