From e373dbd616aba62b9c7f082085cd16eae9f7710c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 11 Mar 2020 15:52:48 +0100 Subject: [PATCH] use new legacy verif method for a single device --- src/verification.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/verification.js b/src/verification.js index 6f1bb07344..4443079b95 100644 --- a/src/verification.js +++ b/src/verification.js @@ -23,6 +23,7 @@ import {RIGHT_PANEL_PHASES} from "./stores/RightPanelStorePhases"; import {findDMForUser} from './createRoom'; import {accessSecretStorage} from './CrossSigningManager'; import SettingsStore from './settings/SettingsStore'; +import {verificationMethods} from 'matrix-js-sdk/src/crypto'; async function enable4SIfNeeded() { const cli = MatrixClientPeg.get(); @@ -57,9 +58,10 @@ export async function verifyDevice(user, device) { return; } const cli = MatrixClientPeg.get(); - const verificationRequestPromise = cli.requestVerification( + const verificationRequestPromise = cli.legacyDeviceVerification( user.userId, - [device.deviceId], + device.deviceId, + verificationMethods.SAS, ); dis.dispatch({ action: "set_right_panel_phase", @@ -77,7 +79,7 @@ export async function legacyVerifyUser(user) { return; } const cli = MatrixClientPeg.get(); - const verificationRequestPromise = cli.requestVerification(user.userId); + const verificationRequestPromise = cli.beginKeyVerification(user.userId); dis.dispatch({ action: "set_right_panel_phase", phase: RIGHT_PANEL_PHASES.EncryptionPanel,