mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
Don't get stuck on user input
This commit is contained in:
parent
2ef934c39d
commit
901c149e9e
@ -75,7 +75,9 @@ export class CalculateSASStage extends BaseSASVerificationStage {
|
|||||||
const sasBytes = this.generateSASBytes();
|
const sasBytes = this.generateSASBytes();
|
||||||
this.emoji = generateEmojiSas(Array.from(sasBytes));
|
this.emoji = generateEmojiSas(Array.from(sasBytes));
|
||||||
this.eventEmitter.emit("EmojiGenerated", this);
|
this.eventEmitter.emit("EmojiGenerated", this);
|
||||||
await emojiConfirmationPromise;
|
const cancellationReceived = this.channel.waitForEvent(VerificationEventType.Cancel);
|
||||||
|
// Don't get stuck on waiting for user input!
|
||||||
|
await Promise.race([emojiConfirmationPromise, cancellationReceived]);
|
||||||
this.setNextStage(new SendMacStage(this.options));
|
this.setNextStage(new SendMacStage(this.options));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user