From 3d8422c88afe85a59eb9759a8bfb25bafb5ffd22 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 19 Dec 2019 15:23:32 +0000 Subject: [PATCH] Combine cross signing and verification over DM feature flags This means we can just make the new member info panel support cross-signing exclusively rather than having to try & make it temporarily support both --- src/components/structures/MatrixChat.js | 2 +- src/components/structures/RightPanel.js | 4 ++-- src/components/views/dialogs/DeviceVerifyDialog.js | 2 +- src/settings/Settings.js | 7 ------- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 82a682f9ab..8cee3e9def 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -1466,7 +1466,7 @@ export default createReactClass({ } }); - if (SettingsStore.isFeatureEnabled("feature_dm_verification")) { + if (SettingsStore.isFeatureEnabled("feature_cross_signing")) { cli.on("crypto.verification.request", request => { let requestObserver; if (request.event.getRoomId()) { diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index 1745c9d7dc..2f91c5419d 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -190,7 +190,7 @@ export default class RightPanel extends React.Component { } else if (this.state.phase === RIGHT_PANEL_PHASES.GroupRoomList) { panel = ; } else if (this.state.phase === RIGHT_PANEL_PHASES.RoomMemberInfo) { - if (SettingsStore.isFeatureEnabled("feature_dm_verification")) { + if (SettingsStore.isFeatureEnabled("feature_cross_signing")) { const onClose = () => { dis.dispatch({ action: "view_user", @@ -209,7 +209,7 @@ export default class RightPanel extends React.Component { } else if (this.state.phase === RIGHT_PANEL_PHASES.Room3pidMemberInfo) { panel = ; } else if (this.state.phase === RIGHT_PANEL_PHASES.GroupMemberInfo) { - if (SettingsStore.isFeatureEnabled("feature_dm_verification")) { + if (SettingsStore.isFeatureEnabled("feature_cross_signing")) { const onClose = () => { dis.dispatch({ action: "view_user", diff --git a/src/components/views/dialogs/DeviceVerifyDialog.js b/src/components/views/dialogs/DeviceVerifyDialog.js index 0e191cc192..6408245452 100644 --- a/src/components/views/dialogs/DeviceVerifyDialog.js +++ b/src/components/views/dialogs/DeviceVerifyDialog.js @@ -97,7 +97,7 @@ export default class DeviceVerifyDialog extends React.Component { const client = MatrixClientPeg.get(); const verifyingOwnDevice = this.props.userId === client.getUserId(); try { - if (!verifyingOwnDevice && SettingsStore.getValue("feature_dm_verification")) { + if (!verifyingOwnDevice && SettingsStore.getValue("feature_cross_signing")) { const roomId = await ensureDMExistsAndOpen(this.props.userId); // throws upon cancellation before having started this._verifier = await client.requestVerificationDM( diff --git a/src/settings/Settings.js b/src/settings/Settings.js index 82dd639819..f1299a9045 100644 --- a/src/settings/Settings.js +++ b/src/settings/Settings.js @@ -136,13 +136,6 @@ export const SETTINGS = { supportedLevels: ['account'], default: null, }, - "feature_dm_verification": { - isFeature: true, - displayName: _td("Send verification requests in direct message," + - " including a new verification UX in the member panel."), - supportedLevels: LEVELS_FEATURE, - default: false, - }, "feature_cross_signing": { isFeature: true, displayName: _td("Enable cross-signing to verify per-user instead of per-device (in development)"),