Always send scan for RiotX (for now)

This commit is contained in:
Travis Ralston 2020-01-31 11:51:24 +00:00 committed by Bruno Windels
parent 936b40f6b5
commit afc38b92a0
2 changed files with 4 additions and 4 deletions

View file

@ -27,7 +27,7 @@ import {verificationMethods} from 'matrix-js-sdk/src/crypto';
import {ensureDMExists} from "../../../createRoom";
import dis from "../../../dispatcher";
import SettingsStore from '../../../settings/SettingsStore';
import {SHOW_QR_CODE_METHOD} from "matrix-js-sdk/src/crypto/verification/QRCode";
import {SCAN_QR_CODE_METHOD, SHOW_QR_CODE_METHOD} from "matrix-js-sdk/src/crypto/verification/QRCode";
import VerificationQREmojiOptions from "../verification/VerificationQREmojiOptions";
const MODE_LEGACY = 'legacy';
@ -135,6 +135,7 @@ export default class DeviceVerifyDialog extends React.Component {
this._request = await client.requestVerification(this.props.userId, [
verificationMethods.SAS,
SHOW_QR_CODE_METHOD,
SCAN_QR_CODE_METHOD,
]);
await this._request.waitFor(r => r.ready || r.started);

View file

@ -24,7 +24,7 @@ import BaseDialog from './BaseDialog';
import DialogButtons from '../elements/DialogButtons';
import {verificationMethods} from 'matrix-js-sdk/src/crypto';
import {MatrixClientPeg} from "../../../MatrixClientPeg";
import {SHOW_QR_CODE_METHOD} from "matrix-js-sdk/src/crypto/verification/QRCode";
import {SCAN_QR_CODE_METHOD, SHOW_QR_CODE_METHOD} from "matrix-js-sdk/src/crypto/verification/QRCode";
@replaceableComponent("views.dialogs.NewSessionReviewDialog")
export default class NewSessionReviewDialog extends React.PureComponent {
@ -43,12 +43,11 @@ export default class NewSessionReviewDialog extends React.PureComponent {
const cli = MatrixClientPeg.get();
const request = await cli.requestVerification(
userId,
[verificationMethods.SAS, SHOW_QR_CODE_METHOD],
[verificationMethods.SAS, SHOW_QR_CODE_METHOD, SCAN_QR_CODE_METHOD],
[device.deviceId],
);
this.props.onFinished(true);
Modal.createTrackedDialog('New Session Verification', 'Starting dialog', VerificationRequestDialog, {
verificationRequest: request,
});