1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-01 04:43:29 +03:00

Don't require .done event for finishing self-verification

Instead, call onVerifierFinished from the verifier on the request
so we can internally mark it as done. This flag is not persisted,
but we don't have historical (persisted) to-device requests anyway.
This commit is contained in:
Bruno Windels
2020-02-28 14:56:38 +01:00
parent ce6dd8688c
commit ecaf21ceb0
3 changed files with 30 additions and 14 deletions

View File

@@ -186,10 +186,7 @@ export class VerificationBase extends EventEmitter {
done() {
this._endTimer(); // always kill the activity timer
if (!this._done) {
if (this._channel.needsDoneMessage) {
// verification in DM requires a done message
this._send("m.key.verification.done", {});
}
this.request.onVerifierFinished();
this._resolve();
}
}