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

Commit 9eb2341

Browse files
committed
Remove redundant verifier.done() call
This `done` call completes the verification process and stops it responding with further messages. It is unnecessary, *provided* the verification completes successfully, for which see matrix-org/matrix-js-sdk#3382.
1 parent d9d5387 commit 9eb2341

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

cypress/e2e/crypto/utils.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,19 @@ export function waitForVerificationRequest(cli: MatrixClient): Promise<Verificat
3838
}
3939

4040
/**
41-
* Handle an incoming verification request
41+
* Automatically handle an incoming verification request
4242
*
4343
* Starts the key verification process, and, once it is accepted on the other side, confirms that the
4444
* emojis match.
4545
*
46-
* Returns a promise that resolves, with the emoji list, once we confirm the emojis
47-
*
4846
* @param request - incoming verification request
47+
* @returns A promise that resolves, with the emoji list, once we confirm the emojis
4948
*/
50-
export function handleVerificationRequest(request: VerificationRequest) {
49+
export function handleVerificationRequest(request: VerificationRequest): Promise<EmojiMapping[]> {
5150
return new Promise<EmojiMapping[]>((resolve) => {
5251
const onShowSas = (event: ISasEvent) => {
5352
verifier.off("show_sas", onShowSas);
5453
event.confirm();
55-
verifier.done();
5654
resolve(event.sas.emoji);
5755
};
5856

0 commit comments

Comments
 (0)