You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-02 17:02:31 +03:00
detect other end cancelling and reject main promise
This commit is contained in:
@@ -151,6 +151,10 @@ export default class VerificationBase extends EventEmitter {
|
|||||||
this._rejectEvent = undefined;
|
this._rejectEvent = undefined;
|
||||||
this._resetTimer();
|
this._resetTimer();
|
||||||
this._resolveEvent(e);
|
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 {
|
} else {
|
||||||
const exception = new Error(
|
const exception = new Error(
|
||||||
"Unexpected message: expecting " + this._expectedEvent
|
"Unexpected message: expecting " + this._expectedEvent
|
||||||
|
|||||||
Reference in New Issue
Block a user