mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Wait for cross-signing to become available
This commit is contained in:
parent
571e6591c8
commit
fbc31e6fbe
@ -64,8 +64,9 @@ export class DeviceVerificationViewModel extends ErrorReportViewModel<SegmentTyp
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async startVerification(requestOrUserId: SASRequest | string, room?: Room) {
|
private async startVerification(requestOrUserId: SASRequest | string, room?: Room) {
|
||||||
await this.logAndCatch("DeviceVerificationViewModel.start", async (log) => {
|
await this.logAndCatch("DeviceVerificationViewModel.startVerification", async (log) => {
|
||||||
const crossSigning = this.getOption("session").crossSigning.get();
|
const crossSigningObservable = this.getOption("session").crossSigning;
|
||||||
|
const crossSigning = await crossSigningObservable.waitFor(c => !!c).promise;
|
||||||
this.sas = crossSigning.startVerification(requestOrUserId, room, log);
|
this.sas = crossSigning.startVerification(requestOrUserId, room, log);
|
||||||
if (!this.sas) {
|
if (!this.sas) {
|
||||||
throw new Error("CrossSigning.startVerification did not return a sas object!");
|
throw new Error("CrossSigning.startVerification did not return a sas object!");
|
||||||
|
Loading…
Reference in New Issue
Block a user