diff --git a/src/crypto/verification/Base.js b/src/crypto/verification/Base.js index 8275cfa1b..c764f68aa 100644 --- a/src/crypto/verification/Base.js +++ b/src/crypto/verification/Base.js @@ -151,6 +151,10 @@ export default class VerificationBase extends EventEmitter { this._rejectEvent = undefined; this._resetTimer(); this._resolveEvent(e); + } else if (e.getType() === "m.key.verification.cancel") { + const reject = this._reject; + this._reject = undefined; + reject(new Error("Other side cancelled verification")); } else { const exception = new Error( "Unexpected message: expecting " + this._expectedEvent