mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-02-02 07:31:38 +01:00
Throw error if verification was cancelled
This commit is contained in:
parent
9c82dd7ce3
commit
fd96d5843d
@ -249,6 +249,9 @@ export class ToDeviceChannel extends Disposables implements IChannel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
waitForEvent(eventType: string): Promise<any> {
|
waitForEvent(eventType: string): Promise<any> {
|
||||||
|
if (this._isCancelled) {
|
||||||
|
throw new VerificationCancelledError();
|
||||||
|
}
|
||||||
// Check if we already received the message
|
// Check if we already received the message
|
||||||
const receivedMessage = this.receivedMessages.get(eventType);
|
const receivedMessage = this.receivedMessages.get(eventType);
|
||||||
if (receivedMessage) {
|
if (receivedMessage) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user