From eeceb9e6a0d9ba727e10263a48a440295ca2c1a5 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Mon, 19 Jun 2023 13:58:38 +0530 Subject: [PATCH] VerifyMSK after receiving secret --- .../session/verification/DeviceVerificationViewModel.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/domain/session/verification/DeviceVerificationViewModel.ts b/src/domain/session/verification/DeviceVerificationViewModel.ts index da96c869..866b47c4 100644 --- a/src/domain/session/verification/DeviceVerificationViewModel.ts +++ b/src/domain/session/verification/DeviceVerificationViewModel.ts @@ -150,8 +150,12 @@ export class DeviceVerificationViewModel extends ErrorReportViewModel { if (this._needsToRequestSecret) { const secretSharing = this.getOption("session").secretSharing; - const promises = neededSecrets.map((secret) => secretSharing.requestSecret(secret, log)); - await Promise.all(promises); + const requestPromises = neededSecrets.map((secret) => secretSharing.requestSecret(secret, log)); + const secretRequests = await Promise.all(requestPromises); + const receivedSecretPromises = secretRequests.map(r => r.waitForResponse()); + await Promise.all(receivedSecretPromises); + const crossSigning = this.getOption("session").crossSigning.get(); + crossSigning.start(log); } }); }