Merge pull request #4202 from matrix-org/bwindels/devicelegacyverif
Send verification request to a single device in a way compatible with non-cross-signing
This commit is contained in:
commit
b8f30f55fa
1 changed files with 5 additions and 3 deletions
|
@ -23,6 +23,7 @@ import {RIGHT_PANEL_PHASES} from "./stores/RightPanelStorePhases";
|
||||||
import {findDMForUser} from './createRoom';
|
import {findDMForUser} from './createRoom';
|
||||||
import {accessSecretStorage} from './CrossSigningManager';
|
import {accessSecretStorage} from './CrossSigningManager';
|
||||||
import SettingsStore from './settings/SettingsStore';
|
import SettingsStore from './settings/SettingsStore';
|
||||||
|
import {verificationMethods} from 'matrix-js-sdk/src/crypto';
|
||||||
|
|
||||||
async function enable4SIfNeeded() {
|
async function enable4SIfNeeded() {
|
||||||
const cli = MatrixClientPeg.get();
|
const cli = MatrixClientPeg.get();
|
||||||
|
@ -57,9 +58,10 @@ export async function verifyDevice(user, device) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const cli = MatrixClientPeg.get();
|
const cli = MatrixClientPeg.get();
|
||||||
const verificationRequestPromise = cli.requestVerification(
|
const verificationRequestPromise = cli.legacyDeviceVerification(
|
||||||
user.userId,
|
user.userId,
|
||||||
[device.deviceId],
|
device.deviceId,
|
||||||
|
verificationMethods.SAS,
|
||||||
);
|
);
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: "set_right_panel_phase",
|
action: "set_right_panel_phase",
|
||||||
|
@ -77,7 +79,7 @@ export async function legacyVerifyUser(user) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const cli = MatrixClientPeg.get();
|
const cli = MatrixClientPeg.get();
|
||||||
const verificationRequestPromise = cli.requestVerification(user.userId);
|
const verificationRequestPromise = cli.beginKeyVerification(user.userId);
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: "set_right_panel_phase",
|
action: "set_right_panel_phase",
|
||||||
phase: RIGHT_PANEL_PHASES.EncryptionPanel,
|
phase: RIGHT_PANEL_PHASES.EncryptionPanel,
|
||||||
|
|
Loading…
Reference in a new issue