From a1844e44f2b9166c3212e12c2fab5660a51ccfc5 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 11 Feb 2020 17:44:41 +0100 Subject: [PATCH] remove methods arg to requestVerification(DM) as it's easy to have this argument be out of sync from all the places this is called from the js-sdk. There is also little point, as you can already specify the methods a consumer of the js-sdk wants to provide through the verificationMethods option when creating the client object. --- src/components/views/dialogs/DeviceVerifyDialog.js | 2 +- src/components/views/dialogs/NewSessionReviewDialog.js | 6 ------ src/components/views/right_panel/UserInfo.js | 6 ------ 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/components/views/dialogs/DeviceVerifyDialog.js b/src/components/views/dialogs/DeviceVerifyDialog.js index f8d66ae641..835b7daf02 100644 --- a/src/components/views/dialogs/DeviceVerifyDialog.js +++ b/src/components/views/dialogs/DeviceVerifyDialog.js @@ -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) { diff --git a/src/components/views/dialogs/NewSessionReviewDialog.js b/src/components/views/dialogs/NewSessionReviewDialog.js index 643a5a3c5d..53e97de9e0 100644 --- a/src/components/views/dialogs/NewSessionReviewDialog.js +++ b/src/components/views/dialogs/NewSessionReviewDialog.js @@ -43,12 +43,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], ); diff --git a/src/components/views/right_panel/UserInfo.js b/src/components/views/right_panel/UserInfo.js index 9db8de1ae3..db73f510a0 100644 --- a/src/components/views/right_panel/UserInfo.js +++ b/src/components/views/right_panel/UserInfo.js @@ -157,12 +157,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({