Merge pull request #4058 from matrix-org/bwindels/dontpassmethodstoverify

remove methods arg to requestVerification(DM)
pull/21833/head
Bruno Windels 2020-02-13 08:51:36 +00:00 committed by GitHub
commit ec708b5e9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 17 deletions

View File

@ -123,7 +123,7 @@ export default class DeviceVerifyDialog extends React.Component {
const roomId = await ensureDMExistsAndOpen(this.props.userId);
// throws upon cancellation before having started
const request = await client.requestVerificationDM(
this.props.userId, roomId, [verificationMethods.SAS],
this.props.userId, roomId,
);
await request.waitFor(r => r.ready || r.started);
if (request.ready) {

View File

@ -22,9 +22,7 @@ import { replaceableComponent } from '../../../utils/replaceableComponent';
import VerificationRequestDialog from './VerificationRequestDialog';
import BaseDialog from './BaseDialog';
import DialogButtons from '../elements/DialogButtons';
import {verificationMethods} from 'matrix-js-sdk/src/crypto';
import {MatrixClientPeg} from "../../../MatrixClientPeg";
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 +41,6 @@ export default class NewSessionReviewDialog extends React.PureComponent {
const cli = MatrixClientPeg.get();
const request = await cli.requestVerification(
userId,
[
verificationMethods.SAS,
SHOW_QR_CODE_METHOD,
SCAN_QR_CODE_METHOD,
verificationMethods.RECIPROCATE_QR_CODE,
],
[device.deviceId],
);

View File

@ -42,8 +42,6 @@ import {textualPowerLevel} from '../../../Roles';
import MatrixClientContext from "../../../contexts/MatrixClientContext";
import {RIGHT_PANEL_PHASES} from "../../../stores/RightPanelStorePhases";
import EncryptionPanel from "./EncryptionPanel";
import {verificationMethods} from 'matrix-js-sdk/src/crypto';
import {SCAN_QR_CODE_METHOD, SHOW_QR_CODE_METHOD} from "matrix-js-sdk/src/crypto/verification/QRCode";
const _disambiguateDevices = (devices) => {
const names = Object.create(null);
@ -157,12 +155,6 @@ async function verifyDevice(userId, device) {
const cli = MatrixClientPeg.get();
const verificationRequest = await cli.requestVerification(
userId,
[
verificationMethods.SAS,
SHOW_QR_CODE_METHOD,
SCAN_QR_CODE_METHOD,
verificationMethods.RECIPROCATE_QR_CODE,
],
[device.deviceId],
);
dis.dispatch({