mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-11-20 03:25:52 +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) {
|
||||
await this.logAndCatch("DeviceVerificationViewModel.start", async (log) => {
|
||||
const crossSigning = this.getOption("session").crossSigning.get();
|
||||
await this.logAndCatch("DeviceVerificationViewModel.startVerification", async (log) => {
|
||||
const crossSigningObservable = this.getOption("session").crossSigning;
|
||||
const crossSigning = await crossSigningObservable.waitFor(c => !!c).promise;
|
||||
this.sas = crossSigning.startVerification(requestOrUserId, room, log);
|
||||
if (!this.sas) {
|
||||
throw new Error("CrossSigning.startVerification did not return a sas object!");
|
||||
|
Loading…
Reference in New Issue
Block a user