From f0cabd55c090fab6010f63b9e2064012e78bd13c Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 28 May 2020 16:59:27 +0100 Subject: [PATCH 1/2] Remove legacy codepaths for Unknown Device Error (UDE/UDD) handling as we now always `setGlobalErrorOnUnknownDevices(false)` Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .eslintignore.errorfiles | 1 - res/css/_components.scss | 1 - .../views/dialogs/_UnknownDeviceDialog.scss | 48 ----- src/CallHandler.js | 53 ++--- src/components/structures/RoomStatusBar.js | 131 +++++------- .../views/dialogs/UnknownDeviceDialog.js | 187 ------------------ src/cryptodevices.js | 123 ------------ 7 files changed, 63 insertions(+), 481 deletions(-) delete mode 100644 res/css/views/dialogs/_UnknownDeviceDialog.scss delete mode 100644 src/components/views/dialogs/UnknownDeviceDialog.js delete mode 100644 src/cryptodevices.js diff --git a/.eslintignore.errorfiles b/.eslintignore.errorfiles index ffc3b21181..381c7cfd70 100644 --- a/.eslintignore.errorfiles +++ b/.eslintignore.errorfiles @@ -9,7 +9,6 @@ src/components/structures/UploadBar.js src/components/views/avatars/MemberAvatar.js src/components/views/create_room/RoomAlias.js src/components/views/dialogs/SetPasswordDialog.js -src/components/views/dialogs/UnknownDeviceDialog.js src/components/views/elements/AddressSelector.js src/components/views/elements/DirectorySearchBox.js src/components/views/elements/MemberEventListSummary.js diff --git a/res/css/_components.scss b/res/css/_components.scss index 44c63b9df7..37a97d27e4 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -81,7 +81,6 @@ @import "./views/dialogs/_SlashCommandHelpDialog.scss"; @import "./views/dialogs/_TabbedIntegrationManagerDialog.scss"; @import "./views/dialogs/_TermsDialog.scss"; -@import "./views/dialogs/_UnknownDeviceDialog.scss"; @import "./views/dialogs/_UploadConfirmDialog.scss"; @import "./views/dialogs/_UserSettingsDialog.scss"; @import "./views/dialogs/_WidgetOpenIDPermissionsDialog.scss"; diff --git a/res/css/views/dialogs/_UnknownDeviceDialog.scss b/res/css/views/dialogs/_UnknownDeviceDialog.scss deleted file mode 100644 index daa6bd2352..0000000000 --- a/res/css/views/dialogs/_UnknownDeviceDialog.scss +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2016 OpenMarket Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -.mx_UnknownDeviceDialog { - height: 100%; - display: flex; - flex-direction: column; -} - -.mx_UnknownDeviceDialog ul { - list-style: none; - padding: 0; -} -// userid -.mx_UnknownDeviceDialog p { - font-weight: bold; - font-size: $font-16px; -} - -.mx_UnknownDeviceDialog .mx_DeviceVerifyButtons { - flex-direction: row !important; -} - -.mx_UnknownDeviceDialog .mx_Dialog_content { - margin-bottom: 24px; - overflow-y: scroll; -} - -.mx_UnknownDeviceDialog_deviceList > li { - padding: 4px; -} - -.mx_UnknownDeviceDialog_deviceList > li > * { - padding-bottom: 0; -} diff --git a/src/CallHandler.js b/src/CallHandler.js index c95ed16eb3..e3916c25d6 100644 --- a/src/CallHandler.js +++ b/src/CallHandler.js @@ -60,7 +60,6 @@ import * as sdk from './index'; import { _t } from './languageHandler'; import Matrix from 'matrix-js-sdk'; import dis from './dispatcher/dispatcher'; -import { showUnknownDeviceDialogForCalls } from './cryptodevices'; import WidgetUtils from './utils/WidgetUtils'; import WidgetEchoStore from './stores/WidgetEchoStore'; import SettingsStore, { SettingLevel } from './settings/SettingsStore'; @@ -134,47 +133,19 @@ function _reAttemptCall(call) { function _setCallListeners(call) { call.on("error", function(err) { console.error("Call error:", err); - if (err.code === 'unknown_devices') { - const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog"); - - Modal.createTrackedDialog('Call Failed', '', QuestionDialog, { - title: _t('Call Failed'), - description: _t( - "There are unknown sessions in this room: "+ - "if you proceed without verifying them, it will be "+ - "possible for someone to eavesdrop on your call.", - ), - button: _t('Review Sessions'), - onFinished: function(confirmed) { - if (confirmed) { - const room = MatrixClientPeg.get().getRoom(call.roomId); - showUnknownDeviceDialogForCalls( - MatrixClientPeg.get(), - room, - () => { - _reAttemptCall(call); - }, - call.direction === 'outbound' ? _t("Call Anyway") : _t("Answer Anyway"), - call.direction === 'outbound' ? _t("Call") : _t("Answer"), - ); - } - }, - }); - } else { - if ( - MatrixClientPeg.get().getTurnServers().length === 0 && - SettingsStore.getValue("fallbackICEServerAllowed") === null - ) { - _showICEFallbackPrompt(); - return; - } - - const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); - Modal.createTrackedDialog('Call Failed', '', ErrorDialog, { - title: _t('Call Failed'), - description: err.message, - }); + if ( + MatrixClientPeg.get().getTurnServers().length === 0 && + SettingsStore.getValue("fallbackICEServerAllowed") === null + ) { + _showICEFallbackPrompt(); + return; } + + const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); + Modal.createTrackedDialog('Call Failed', '', ErrorDialog, { + title: _t('Call Failed'), + description: err.message, + }); }); call.on("hangup", function() { _setCallState(undefined, call.roomId, "ended"); diff --git a/src/components/structures/RoomStatusBar.js b/src/components/structures/RoomStatusBar.js index ae628fd06a..dd4b9759d6 100644 --- a/src/components/structures/RoomStatusBar.js +++ b/src/components/structures/RoomStatusBar.js @@ -24,7 +24,6 @@ import { _t, _td } from '../../languageHandler'; import * as sdk from '../../index'; import {MatrixClientPeg} from '../../MatrixClientPeg'; import Resend from '../../Resend'; -import * as cryptodevices from '../../cryptodevices'; import dis from '../../dispatcher/dispatcher'; import {messageForResourceLimitError, messageForSendError} from '../../utils/ErrorUtils'; @@ -126,13 +125,6 @@ export default createReactClass({ }); }, - _onSendWithoutVerifyingClick: function() { - cryptodevices.getUnknownDevicesForRoom(MatrixClientPeg.get(), this.props.room).then((devices) => { - cryptodevices.markAllDevicesKnown(MatrixClientPeg.get(), devices); - Resend.resendUnsentEvents(this.props.room); - }); - }, - _onResendAllClick: function() { Resend.resendUnsentEvents(this.props.room); dis.dispatch({action: 'focus_composer'}); @@ -143,10 +135,6 @@ export default createReactClass({ dis.dispatch({action: 'focus_composer'}); }, - _onShowDevicesClick: function() { - cryptodevices.showUnknownDeviceDialogForMessages(MatrixClientPeg.get(), this.props.room); - }, - _onRoomLocalEchoUpdated: function(event, room, oldEventId, oldStatus) { if (room.roomId !== this.props.room.roomId) return; @@ -213,82 +201,65 @@ export default createReactClass({ if (!unsentMessages.length) return null; let title; - let content; - const hasUDE = unsentMessages.some((m) => { - return m.error && m.error.name === "UnknownDeviceError"; - }); - - if (hasUDE) { - title = _t("Message not sent due to unknown sessions being present"); - content = _t( - "Show sessions, send anyway or cancel.", + let consentError = null; + let resourceLimitError = null; + for (const m of unsentMessages) { + if (m.error && m.error.errcode === 'M_CONSENT_NOT_GIVEN') { + consentError = m.error; + break; + } else if (m.error && m.error.errcode === 'M_RESOURCE_LIMIT_EXCEEDED') { + resourceLimitError = m.error; + break; + } + } + if (consentError) { + title = _t( + "You can't send any messages until you review and agree to " + + "our terms and conditions.", {}, { - 'showSessionsText': (sub) => { sub }, - 'sendAnywayText': (sub) => { sub }, - 'cancelText': (sub) => { sub }, + 'consentLink': (sub) => + + { sub } + , }, ); + } else if (resourceLimitError) { + title = messageForResourceLimitError( + resourceLimitError.data.limit_type, + resourceLimitError.data.admin_contact, { + 'monthly_active_user': _td( + "Your message wasn't sent because this homeserver has hit its Monthly Active User Limit. " + + "Please contact your service administrator to continue using the service.", + ), + '': _td( + "Your message wasn't sent because this homeserver has exceeded a resource limit. " + + "Please contact your service administrator to continue using the service.", + ), + }); + } else if ( + unsentMessages.length === 1 && + unsentMessages[0].error && + unsentMessages[0].error.data && + unsentMessages[0].error.data.error + ) { + title = messageForSendError(unsentMessages[0].error.data) || unsentMessages[0].error.data.error; } else { - let consentError = null; - let resourceLimitError = null; - for (const m of unsentMessages) { - if (m.error && m.error.errcode === 'M_CONSENT_NOT_GIVEN') { - consentError = m.error; - break; - } else if (m.error && m.error.errcode === 'M_RESOURCE_LIMIT_EXCEEDED') { - resourceLimitError = m.error; - break; - } - } - if (consentError) { - title = _t( - "You can't send any messages until you review and agree to " + - "our terms and conditions.", - {}, - { - 'consentLink': (sub) => - - { sub } - , - }, - ); - } else if (resourceLimitError) { - title = messageForResourceLimitError( - resourceLimitError.data.limit_type, - resourceLimitError.data.admin_contact, { - 'monthly_active_user': _td( - "Your message wasn't sent because this homeserver has hit its Monthly Active User Limit. " + - "Please contact your service administrator to continue using the service.", - ), - '': _td( - "Your message wasn't sent because this homeserver has exceeded a resource limit. " + - "Please contact your service administrator to continue using the service.", - ), - }); - } else if ( - unsentMessages.length === 1 && - unsentMessages[0].error && - unsentMessages[0].error.data && - unsentMessages[0].error.data.error - ) { - title = messageForSendError(unsentMessages[0].error.data) || unsentMessages[0].error.data.error; - } else { - title = _t('%(count)s of your messages have not been sent.', { count: unsentMessages.length }); - } - content = _t("%(count)s Resend all or cancel all now. " + - "You can also select individual messages to resend or cancel.", - { count: unsentMessages.length }, - { - 'resendText': (sub) => - { sub }, - 'cancelText': (sub) => - { sub }, - }, - ); + title = _t('%(count)s of your messages have not been sent.', { count: unsentMessages.length }); } + const content = _t("%(count)s Resend all or cancel all " + + "now. You can also select individual messages to resend or cancel.", + { count: unsentMessages.length }, + { + 'resendText': (sub) => + { sub }, + 'cancelText': (sub) => + { sub }, + }, + ); + return
diff --git a/src/components/views/dialogs/UnknownDeviceDialog.js b/src/components/views/dialogs/UnknownDeviceDialog.js deleted file mode 100644 index 4cad13b047..0000000000 --- a/src/components/views/dialogs/UnknownDeviceDialog.js +++ /dev/null @@ -1,187 +0,0 @@ -/* -Copyright 2017 Vector Creations Ltd -Copyright 2017 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import React from 'react'; -import createReactClass from 'create-react-class'; -import PropTypes from 'prop-types'; -import * as sdk from '../../../index'; -import {MatrixClientPeg} from '../../../MatrixClientPeg'; -import { _t } from '../../../languageHandler'; -import SettingsStore from "../../../settings/SettingsStore"; -import { markAllDevicesKnown } from '../../../cryptodevices'; - -function UserUnknownDeviceList(props) { - const MemberDeviceInfo = sdk.getComponent('rooms.MemberDeviceInfo'); - const {userId, userDevices} = props; - - const deviceListEntries = Object.keys(userDevices).map((deviceId) => -
  • , - ); - - return ( - - ); -} - -UserUnknownDeviceList.propTypes = { - userId: PropTypes.string.isRequired, - - // map from deviceid -> deviceinfo - userDevices: PropTypes.object.isRequired, -}; - - -function UnknownDeviceList(props) { - const {devices} = props; - - const userListEntries = Object.keys(devices).map((userId) => -
  • -

    { userId }:

    - -
  • , - ); - - return ; -} - -UnknownDeviceList.propTypes = { - // map from userid -> deviceid -> deviceinfo - devices: PropTypes.object.isRequired, -}; - - -export default createReactClass({ - displayName: 'UnknownDeviceDialog', - - propTypes: { - room: PropTypes.object.isRequired, - - // map from userid -> deviceid -> deviceinfo or null if devices are not yet loaded - devices: PropTypes.object, - - onFinished: PropTypes.func.isRequired, - - // Label for the button that marks all devices known and tries the send again - sendAnywayLabel: PropTypes.string.isRequired, - - // Label for the button that to send the event if you've verified all devices - sendLabel: PropTypes.string.isRequired, - - // function to retry the request once all devices are verified / known - onSend: PropTypes.func.isRequired, - }, - - componentDidMount: function() { - MatrixClientPeg.get().on("deviceVerificationChanged", this._onDeviceVerificationChanged); - }, - - componentWillUnmount: function() { - if (MatrixClientPeg.get()) { - MatrixClientPeg.get().removeListener("deviceVerificationChanged", this._onDeviceVerificationChanged); - } - }, - - _onDeviceVerificationChanged: function(userId, deviceId, deviceInfo) { - if (this.props.devices[userId] && this.props.devices[userId][deviceId]) { - // XXX: Mutating props :/ - this.props.devices[userId][deviceId] = deviceInfo; - this.forceUpdate(); - } - }, - - _onDismissClicked: function() { - this.props.onFinished(); - }, - - _onSendAnywayClicked: function() { - markAllDevicesKnown(MatrixClientPeg.get(), this.props.devices); - - this.props.onFinished(); - this.props.onSend(); - }, - - _onSendClicked: function() { - this.props.onFinished(); - this.props.onSend(); - }, - - render: function() { - if (this.props.devices === null) { - const Spinner = sdk.getComponent("elements.Spinner"); - return ; - } - - let warning; - if (SettingsStore.getValue("blacklistUnverifiedDevices", this.props.room.roomId)) { - warning = ( -

    - { _t("You are currently blacklisting unverified sessions; to send " + - "messages to these sessions you must verify them.") } -

    - ); - } else { - warning = ( -
    -

    - { _t("We recommend you go through the verification process " + - "for each session to confirm they belong to their legitimate owner, " + - "but you can resend the message without verifying if you prefer.") } -

    -
    - ); - } - - let haveUnknownDevices = false; - Object.keys(this.props.devices).forEach((userId) => { - Object.keys(this.props.devices[userId]).map((deviceId) => { - const device = this.props.devices[userId][deviceId]; - if (device.isUnverified() && !device.isKnown()) { - haveUnknownDevices = true; - } - }); - }); - const sendButtonOnClick = haveUnknownDevices ? this._onSendAnywayClicked : this._onSendClicked; - const sendButtonLabel = haveUnknownDevices ? this.props.sendAnywayLabel : this.props.sendAnywayLabel; - - const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog'); - const DialogButtons = sdk.getComponent('views.elements.DialogButtons'); - return ( - -
    -

    - { _t('"%(RoomName)s" contains sessions that you haven\'t seen before.', {RoomName: this.props.room.name}) } -

    - { warning } - { _t("Unknown sessions") }: - - -
    - -
    - ); - // XXX: do we want to give the user the option to enable blacklistUnverifiedDevices for this room (or globally) at this point? - // It feels like confused users will likely turn it on and then disappear in a cloud of UISIs... - }, -}); diff --git a/src/cryptodevices.js b/src/cryptodevices.js deleted file mode 100644 index 86b97364f9..0000000000 --- a/src/cryptodevices.js +++ /dev/null @@ -1,123 +0,0 @@ -/* -Copyright 2017 New Vector Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import Resend from './Resend'; -import * as sdk from './index'; -import dis from './dispatcher/dispatcher'; -import Modal from './Modal'; -import { _t } from './languageHandler'; - -/** - * Mark all given devices as 'known' - * - * @param {MatrixClient} matrixClient A MatrixClient - * @param {Object} devices Map from userid -> deviceid -> deviceinfo - */ -export function markAllDevicesKnown(matrixClient, devices) { - Object.keys(devices).forEach((userId) => { - Object.keys(devices[userId]).map((deviceId) => { - matrixClient.setDeviceKnown(userId, deviceId, true); - }); - }); -} - -/** - * Gets all crypto devices in a room that are marked neither known - * nor verified. - * - * @param {MatrixClient} matrixClient A MatrixClient - * @param {Room} room js-sdk room object representing the room - * @return {Promise} A promise which resolves to a map userId->deviceId->{@link - * module:crypto~DeviceInfo|DeviceInfo}. - */ -export async function getUnknownDevicesForRoom(matrixClient, room) { - const roomMembers = (await room.getEncryptionTargetMembers()).map((m) => { - return m.userId; - }); - const devices = await matrixClient.downloadKeys(roomMembers, false); - const unknownDevices = {}; - // This is all devices in this room, so find the unknown ones. - Object.keys(devices).forEach((userId) => { - Object.keys(devices[userId]).map((deviceId) => { - const device = devices[userId][deviceId]; - - if (device.isUnverified() && !device.isKnown()) { - if (unknownDevices[userId] === undefined) { - unknownDevices[userId] = {}; - } - unknownDevices[userId][deviceId] = device; - } - }); - }); - return unknownDevices; -} - -function focusComposer() { - dis.dispatch({action: 'focus_composer'}); -} - -/** - * Show the UnknownDeviceDialog for a given room. The dialog will inform the user - * that messages they sent to this room have not been sent due to unknown devices - * being present. - * - * @param {MatrixClient} matrixClient A MatrixClient - * @param {Room} room js-sdk room object representing the room - */ -export function showUnknownDeviceDialogForMessages(matrixClient, room) { - getUnknownDevicesForRoom(matrixClient, room).then((unknownDevices) => { - const onSendClicked = () => { - Resend.resendUnsentEvents(room); - }; - - const UnknownDeviceDialog = sdk.getComponent('dialogs.UnknownDeviceDialog'); - Modal.createTrackedDialog('Unknown Device Dialog', '', UnknownDeviceDialog, { - room: room, - devices: unknownDevices, - sendAnywayLabel: _t("Send anyway"), - sendLabel: _t("Send"), - onSend: onSendClicked, - onFinished: focusComposer, - }, 'mx_Dialog_unknownDevice'); - }); -} - -/** - * Show the UnknownDeviceDialog for a given room. The dialog will inform the user - * that a call they tried to place or answer in the room couldn't be placed or - * answered due to unknown devices being present. - * - * @param {MatrixClient} matrixClient A MatrixClient - * @param {Room} room js-sdk room object representing the room - * @param {func} sendAnyway Function called when the 'call anyway' or 'call' - * button is pressed. This should attempt to place or answer the call again. - * @param {string} sendAnywayLabel Label for the button displayed to retry the call - * when unknown devices are still present (eg. "Call Anyway") - * @param {string} sendLabel Label for the button displayed to retry the call - * after all devices have been verified (eg. "Call") - */ -export function showUnknownDeviceDialogForCalls(matrixClient, room, sendAnyway, sendAnywayLabel, sendLabel) { - getUnknownDevicesForRoom(matrixClient, room).then((unknownDevices) => { - const UnknownDeviceDialog = sdk.getComponent('dialogs.UnknownDeviceDialog'); - Modal.createTrackedDialog('Unknown Device Dialog', '', UnknownDeviceDialog, { - room: room, - devices: unknownDevices, - sendAnywayLabel: sendAnywayLabel, - sendLabel: sendLabel, - onSend: sendAnyway, - }, 'mx_Dialog_unknownDevice'); - }); -} From 8aaa7825efa4c8ec7b7b0a4dbfda19261aae2133 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 28 May 2020 17:12:19 +0100 Subject: [PATCH 2/2] Also kill off things that these kept behind Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .eslintignore.errorfiles | 1 - res/css/_components.scss | 2 - .../views/dialogs/_DeviceVerifyDialog.scss | 29 -- res/css/views/rooms/_MemberDeviceInfo.scss | 95 ----- src/CallHandler.js | 12 - .../views/dialogs/DeviceVerifyDialog.js | 373 ------------------ .../views/dialogs/KeyShareDialog.js | 178 --------- .../views/elements/DeviceVerifyButtons.js | 127 ------ .../views/rooms/MemberDeviceInfo.js | 59 --- src/i18n/strings/en_EN.json | 47 +-- 10 files changed, 5 insertions(+), 918 deletions(-) delete mode 100644 res/css/views/dialogs/_DeviceVerifyDialog.scss delete mode 100644 res/css/views/rooms/_MemberDeviceInfo.scss delete mode 100644 src/components/views/dialogs/DeviceVerifyDialog.js delete mode 100644 src/components/views/dialogs/KeyShareDialog.js delete mode 100644 src/components/views/elements/DeviceVerifyButtons.js delete mode 100644 src/components/views/rooms/MemberDeviceInfo.js diff --git a/.eslintignore.errorfiles b/.eslintignore.errorfiles index 381c7cfd70..8362fcd2b4 100644 --- a/.eslintignore.errorfiles +++ b/.eslintignore.errorfiles @@ -22,7 +22,6 @@ src/components/views/room_settings/ColorSettings.js src/components/views/rooms/Autocomplete.js src/components/views/rooms/AuxPanel.js src/components/views/rooms/LinkPreviewWidget.js -src/components/views/rooms/MemberDeviceInfo.js src/components/views/rooms/MemberInfo.js src/components/views/rooms/MemberList.js src/components/views/rooms/RoomList.js diff --git a/res/css/_components.scss b/res/css/_components.scss index 37a97d27e4..7bb159f00f 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -61,7 +61,6 @@ @import "./views/dialogs/_CreateGroupDialog.scss"; @import "./views/dialogs/_CreateRoomDialog.scss"; @import "./views/dialogs/_DeactivateAccountDialog.scss"; -@import "./views/dialogs/_DeviceVerifyDialog.scss"; @import "./views/dialogs/_DevtoolsDialog.scss"; @import "./views/dialogs/_GroupAddressPicker.scss"; @import "./views/dialogs/_IncomingSasDialog.scss"; @@ -166,7 +165,6 @@ @import "./views/rooms/_InviteOnlyIcon.scss"; @import "./views/rooms/_JumpToBottomButton.scss"; @import "./views/rooms/_LinkPreviewWidget.scss"; -@import "./views/rooms/_MemberDeviceInfo.scss"; @import "./views/rooms/_MemberInfo.scss"; @import "./views/rooms/_MemberList.scss"; @import "./views/rooms/_MessageComposer.scss"; diff --git a/res/css/views/dialogs/_DeviceVerifyDialog.scss b/res/css/views/dialogs/_DeviceVerifyDialog.scss deleted file mode 100644 index 1997e0c21d..0000000000 --- a/res/css/views/dialogs/_DeviceVerifyDialog.scss +++ /dev/null @@ -1,29 +0,0 @@ -/* -Copyright 2019 New Vector Ltd. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -.mx_DeviceVerifyDialog_cryptoSection ul { - display: table; -} - -.mx_DeviceVerifyDialog_cryptoSection li { - display: table-row; -} - -.mx_DeviceVerifyDialog_cryptoSection label, -.mx_DeviceVerifyDialog_cryptoSection span { - display: table-cell; - padding-right: 1em; -} diff --git a/res/css/views/rooms/_MemberDeviceInfo.scss b/res/css/views/rooms/_MemberDeviceInfo.scss deleted file mode 100644 index 71b05a93fc..0000000000 --- a/res/css/views/rooms/_MemberDeviceInfo.scss +++ /dev/null @@ -1,95 +0,0 @@ -/* -Copyright 2016 OpenMarket Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -.mx_MemberDeviceInfo { - display: flex; - padding-bottom: 10px; - align-items: flex-start; -} - -.mx_MemberDeviceInfo_icon { - margin-top: 4px; - width: 12px; - height: 12px; - mask-repeat: no-repeat; - mask-size: 100%; -} -.mx_MemberDeviceInfo_icon_blacklisted { - mask-image: url('$(res)/img/e2e/blacklisted.svg'); - background-color: $warning-color; -} -.mx_MemberDeviceInfo_icon_verified { - mask-image: url('$(res)/img/e2e/verified.svg'); - background-color: $accent-color; -} -.mx_MemberDeviceInfo_icon_unverified { - mask-image: url('$(res)/img/e2e/warning.svg'); - background-color: $warning-color; -} - -.mx_MemberDeviceInfo > .mx_DeviceVerifyButtons { - display: flex; - flex-direction: column; - flex: 0 1 auto; - align-items: stretch; -} - -.mx_MemberDeviceInfo_textButton { - @mixin mx_DialogButton_small; - margin: 2px; - flex: 1; -} - -.mx_MemberDeviceInfo_textButton:hover { - @mixin mx_DialogButton_hover; -} - -.mx_MemberDeviceInfo_deviceId { - word-break: break-word; - font-size: $font-13px; -} - -.mx_MemberDeviceInfo_deviceInfo { - margin: 0 5px 5px 8px; - flex: 1; -} - -/* "Unblacklist" is too long for a regular button: make it wider and - reduce the padding. */ -.mx_EncryptedEventDialog .mx_MemberDeviceInfo_blacklist, -.mx_EncryptedEventDialog .mx_MemberDeviceInfo_unblacklist { - padding-left: 1em; - padding-right: 1em; -} - -.mx_MemberDeviceInfo div.mx_MemberDeviceInfo_verified, -.mx_MemberDeviceInfo div.mx_MemberDeviceInfo_unverified, -.mx_MemberDeviceInfo div.mx_MemberDeviceInfo_blacklisted { - float: right; - padding-left: 1em; -} - -.mx_MemberDeviceInfo div.mx_MemberDeviceInfo_verified { - color: $e2e-verified-color; -} - -.mx_MemberDeviceInfo div.mx_MemberDeviceInfo_unverified { - color: $e2e-unverified-color; -} - -.mx_MemberDeviceInfo div.mx_MemberDeviceInfo_blacklisted { - color: $e2e-warning-color; -} diff --git a/src/CallHandler.js b/src/CallHandler.js index e3916c25d6..4414bce457 100644 --- a/src/CallHandler.js +++ b/src/CallHandler.js @@ -118,18 +118,6 @@ function pause(audioId) { } } -function _reAttemptCall(call) { - if (call.direction === 'outbound') { - dis.dispatch({ - action: 'place_call', - room_id: call.roomId, - type: call.type, - }); - } else { - call.answer(); - } -} - function _setCallListeners(call) { call.on("error", function(err) { console.error("Call error:", err); diff --git a/src/components/views/dialogs/DeviceVerifyDialog.js b/src/components/views/dialogs/DeviceVerifyDialog.js deleted file mode 100644 index 5e02a085d8..0000000000 --- a/src/components/views/dialogs/DeviceVerifyDialog.js +++ /dev/null @@ -1,373 +0,0 @@ -/* -Copyright 2016 OpenMarket Ltd -Copyright 2017 Vector Creations Ltd -Copyright 2019 New Vector Ltd -Copyright 2019 Michael Telatynski <7t3chguy@gmail.com> - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import React from 'react'; -import PropTypes from 'prop-types'; -import {MatrixClientPeg} from '../../../MatrixClientPeg'; -import * as sdk from '../../../index'; -import * as FormattingUtils from '../../../utils/FormattingUtils'; -import { _t } from '../../../languageHandler'; -import {verificationMethods} from 'matrix-js-sdk/src/crypto'; -import {ensureDMExists} from "../../../createRoom"; -import dis from "../../../dispatcher/dispatcher"; -import {SHOW_QR_CODE_METHOD} from "matrix-js-sdk/src/crypto/verification/QRCode"; -import VerificationQREmojiOptions from "../verification/VerificationQREmojiOptions"; - -const MODE_LEGACY = 'legacy'; -const MODE_SAS = 'sas'; - -const PHASE_START = 0; -const PHASE_WAIT_FOR_PARTNER_TO_ACCEPT = 1; -const PHASE_PICK_VERIFICATION_OPTION = 2; -const PHASE_SHOW_SAS = 3; -const PHASE_WAIT_FOR_PARTNER_TO_CONFIRM = 4; -const PHASE_VERIFIED = 5; -const PHASE_CANCELLED = 6; - -export default class DeviceVerifyDialog extends React.Component { - static propTypes = { - userId: PropTypes.string.isRequired, - device: PropTypes.object.isRequired, - onFinished: PropTypes.func.isRequired, - }; - - constructor() { - super(); - this._verifier = null; - this._showSasEvent = null; - this._request = null; - this.state = { - phase: PHASE_START, - mode: MODE_SAS, - sasVerified: false, - }; - } - - componentWillUnmount() { - if (this._verifier) { - this._verifier.removeListener('show_sas', this._onVerifierShowSas); - this._verifier.cancel('User cancel'); - } - } - - _onSwitchToLegacyClick = () => { - if (this._verifier) { - this._verifier.removeListener('show_sas', this._onVerifierShowSas); - this._verifier.cancel('User cancel'); - this._verifier = null; - } - this.setState({mode: MODE_LEGACY}); - } - - _onSwitchToSasClick = () => { - this.setState({mode: MODE_SAS}); - } - - _onCancelClick = () => { - this.props.onFinished(false); - } - - _onUseSasClick = async () => { - try { - this._verifier = this._request.beginKeyVerification(verificationMethods.SAS); - this._verifier.on('show_sas', this._onVerifierShowSas); - // throws upon cancellation - await this._verifier.verify(); - this.setState({phase: PHASE_VERIFIED}); - this._verifier.removeListener('show_sas', this._onVerifierShowSas); - this._verifier = null; - } catch (e) { - console.log("Verification failed", e); - this.setState({ - phase: PHASE_CANCELLED, - }); - this._verifier = null; - this._request = null; - } - }; - - _onLegacyFinished = (confirm) => { - if (confirm) { - MatrixClientPeg.get().setDeviceVerified( - this.props.userId, this.props.device.deviceId, true, - ); - } - this.props.onFinished(confirm); - } - - _onSasRequestClick = async () => { - this.setState({ - phase: PHASE_WAIT_FOR_PARTNER_TO_ACCEPT, - }); - const client = MatrixClientPeg.get(); - const verifyingOwnDevice = this.props.userId === client.getUserId(); - try { - if (!verifyingOwnDevice) { - const roomId = await ensureDMExistsAndOpen(this.props.userId); - // throws upon cancellation before having started - const request = await client.requestVerificationDM( - this.props.userId, roomId, - ); - await request.waitFor(r => r.ready || r.started); - if (request.ready) { - this._verifier = request.beginKeyVerification(verificationMethods.SAS); - } else { - this._verifier = request.verifier; - } - } else { - this._request = await client.requestVerification(this.props.userId, [ - verificationMethods.SAS, - SHOW_QR_CODE_METHOD, - verificationMethods.RECIPROCATE_QR_CODE, - ]); - - await this._request.waitFor(r => r.ready || r.started); - this.setState({phase: PHASE_PICK_VERIFICATION_OPTION}); - } - - if (!this._verifier) return; - this._verifier.on('show_sas', this._onVerifierShowSas); - // throws upon cancellation - await this._verifier.verify(); - this.setState({phase: PHASE_VERIFIED}); - this._verifier.removeListener('show_sas', this._onVerifierShowSas); - this._verifier = null; - } catch (e) { - console.log("Verification failed", e); - this.setState({ - phase: PHASE_CANCELLED, - }); - this._verifier = null; - } - } - - _onSasMatchesClick = () => { - this._showSasEvent.confirm(); - this.setState({ - phase: PHASE_WAIT_FOR_PARTNER_TO_CONFIRM, - }); - } - - _onVerifiedDoneClick = () => { - this.props.onFinished(true); - } - - _onVerifierShowSas = (e) => { - this._showSasEvent = e; - this.setState({ - phase: PHASE_SHOW_SAS, - }); - } - - _renderSasVerification() { - let body; - switch (this.state.phase) { - case PHASE_START: - body = this._renderVerificationPhaseStart(); - break; - case PHASE_WAIT_FOR_PARTNER_TO_ACCEPT: - body = this._renderVerificationPhaseWaitAccept(); - break; - case PHASE_PICK_VERIFICATION_OPTION: - body = this._renderVerificationPhasePick(); - break; - case PHASE_SHOW_SAS: - body = this._renderSasVerificationPhaseShowSas(); - break; - case PHASE_WAIT_FOR_PARTNER_TO_CONFIRM: - body = this._renderSasVerificationPhaseWaitForPartnerToConfirm(); - break; - case PHASE_VERIFIED: - body = this._renderVerificationPhaseVerified(); - break; - case PHASE_CANCELLED: - body = this._renderVerificationPhaseCancelled(); - break; - } - - const BaseDialog = sdk.getComponent("dialogs.BaseDialog"); - return ( - - {body} - - ); - } - - _renderVerificationPhaseStart() { - const AccessibleButton = sdk.getComponent('views.elements.AccessibleButton'); - const DialogButtons = sdk.getComponent('views.elements.DialogButtons'); - return ( -
    - - {_t("Use Legacy Verification (for older clients)")} - -

    - { _t("Verify by comparing a short text string.") } -

    -

    - {_t("To be secure, do this in person or use a trusted way to communicate.")} -

    - -
    - ); - } - - _renderVerificationPhaseWaitAccept() { - const Spinner = sdk.getComponent("views.elements.Spinner"); - const AccessibleButton = sdk.getComponent('views.elements.AccessibleButton'); - - return ( -
    - -

    {_t("Waiting for partner to accept...")}

    -

    {_t( - "Nothing appearing? Not all clients support interactive verification yet. " + - ".", - {}, {button: sub => - {sub} - }, - )}

    -
    - ); - } - - _renderVerificationPhasePick() { - return ; - } - - _renderSasVerificationPhaseShowSas() { - const VerificationShowSas = sdk.getComponent('views.verification.VerificationShowSas'); - return ; - } - - _renderSasVerificationPhaseWaitForPartnerToConfirm() { - const Spinner = sdk.getComponent('views.elements.Spinner'); - return
    - -

    {_t( - "Waiting for %(userId)s to confirm...", {userId: this.props.userId}, - )}

    -
    ; - } - - _renderVerificationPhaseVerified() { - const VerificationComplete = sdk.getComponent('views.verification.VerificationComplete'); - return ; - } - - _renderVerificationPhaseCancelled() { - const VerificationCancelled = sdk.getComponent('views.verification.VerificationCancelled'); - return ; - } - - _renderLegacyVerification() { - const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog"); - const AccessibleButton = sdk.getComponent('views.elements.AccessibleButton'); - - let text; - if (MatrixClientPeg.get().getUserId() === this.props.userId) { - text = _t("To verify that this session can be trusted, please check that the key you see " + - "in User Settings on that device matches the key below:"); - } else { - text = _t("To verify that this session can be trusted, please contact its owner using some other " + - "means (e.g. in person or a phone call) and ask them whether the key they see in their User Settings " + - "for this session matches the key below:"); - } - - const key = FormattingUtils.formatCryptoKey(this.props.device.getFingerprint()); - const body = ( -
    - - {_t("Use two-way text verification")} - -

    - { text } -

    -
    -
      -
    • { this.props.device.getDisplayName() }
    • -
    • { this.props.device.deviceId }
    • -
    • { key }
    • -
    -
    -

    - { _t("If it matches, press the verify button below. " + - "If it doesn't, then someone else is intercepting this session " + - "and you probably want to press the blacklist button instead.") } -

    -
    - ); - - return ( - - ); - } - - render() { - if (this.state.mode === MODE_LEGACY) { - return this._renderLegacyVerification(); - } else { - return
    - {this._renderSasVerification()} -
    ; - } - } -} - -async function ensureDMExistsAndOpen(userId) { - const roomId = await ensureDMExists(MatrixClientPeg.get(), userId); - // don't use andView and spinner in createRoom, together, they cause this dialog to close and reopen, - // we causes us to loose the verifier and restart, and we end up having two verification requests - dis.dispatch({ - action: 'view_room', - room_id: roomId, - should_peek: false, - }); - return roomId; -} diff --git a/src/components/views/dialogs/KeyShareDialog.js b/src/components/views/dialogs/KeyShareDialog.js deleted file mode 100644 index 8ef36bb59f..0000000000 --- a/src/components/views/dialogs/KeyShareDialog.js +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright 2017 Vector Creations Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import Modal from '../../../Modal'; -import React from 'react'; -import createReactClass from 'create-react-class'; -import PropTypes from 'prop-types'; -import * as sdk from '../../../index'; - -import { _t, _td } from '../../../languageHandler'; - -// TODO: We can remove this once cross-signing is the only way. -// https://github.com/vector-im/riot-web/issues/11908 - -/** - * Dialog which asks the user whether they want to share their keys with - * an unverified device. - * - * onFinished is called with `true` if the key should be shared, `false` if it - * should not, and `undefined` if the dialog is cancelled. (In other words: - * truthy: do the key share. falsy: don't share the keys). - */ -export default createReactClass({ - propTypes: { - matrixClient: PropTypes.object.isRequired, - userId: PropTypes.string.isRequired, - deviceId: PropTypes.string.isRequired, - onFinished: PropTypes.func.isRequired, - }, - - getInitialState: function() { - return { - deviceInfo: null, - wasNewDevice: false, - }; - }, - - componentDidMount: function() { - this._unmounted = false; - const userId = this.props.userId; - const deviceId = this.props.deviceId; - - // give the client a chance to refresh the device list - this.props.matrixClient.downloadKeys([userId], false).then((r) => { - if (this._unmounted) { return; } - - const deviceInfo = r[userId][deviceId]; - - if (!deviceInfo) { - console.warn(`No details found for session ${userId}:${deviceId}`); - - this.props.onFinished(false); - return; - } - - const wasNewDevice = !deviceInfo.isKnown(); - - this.setState({ - deviceInfo: deviceInfo, - wasNewDevice: wasNewDevice, - }); - - // if the device was new before, it's not any more. - if (wasNewDevice) { - this.props.matrixClient.setDeviceKnown( - userId, - deviceId, - true, - ); - } - }); - }, - - componentWillUnmount: function() { - this._unmounted = true; - }, - - - _onVerifyClicked: function() { - const DeviceVerifyDialog = sdk.getComponent('views.dialogs.DeviceVerifyDialog'); - - console.log("KeyShareDialog: Starting verify dialog"); - Modal.createTrackedDialog('Key Share', 'Starting dialog', DeviceVerifyDialog, { - userId: this.props.userId, - device: this.state.deviceInfo, - onFinished: (verified) => { - if (verified) { - // can automatically share the keys now. - this.props.onFinished(true); - } - }, - }, null, /* priority = */ false, /* static = */ true); - }, - - _onShareClicked: function() { - console.log("KeyShareDialog: User clicked 'share'"); - this.props.onFinished(true); - }, - - _onIgnoreClicked: function() { - console.log("KeyShareDialog: User clicked 'ignore'"); - this.props.onFinished(false); - }, - - _renderContent: function() { - const displayName = this.state.deviceInfo.getDisplayName() || - this.state.deviceInfo.deviceId; - - let text; - if (this.state.wasNewDevice) { - text = _td("You added a new session '%(displayName)s', which is" - + " requesting encryption keys."); - } else { - text = _td("Your unverified session '%(displayName)s' is requesting" - + " encryption keys."); - } - text = _t(text, {displayName: displayName}); - - return ( -
    -

    { text }

    - -
    - - - -
    -
    - ); - }, - - render: function() { - const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog'); - const Spinner = sdk.getComponent('views.elements.Spinner'); - - let content; - - if (this.state.deviceInfo) { - content = this._renderContent(); - } else { - content = ( -
    -

    { _t('Loading session info...') }

    - -
    - ); - } - - return ( - - { content } - - ); - }, -}); diff --git a/src/components/views/elements/DeviceVerifyButtons.js b/src/components/views/elements/DeviceVerifyButtons.js deleted file mode 100644 index 7328d50328..0000000000 --- a/src/components/views/elements/DeviceVerifyButtons.js +++ /dev/null @@ -1,127 +0,0 @@ -/* -Copyright 2016 OpenMarket Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import React from 'react'; -import PropTypes from 'prop-types'; -import createReactClass from 'create-react-class'; -import {MatrixClientPeg} from '../../../MatrixClientPeg'; -import * as sdk from '../../../index'; -import Modal from '../../../Modal'; -import { _t } from '../../../languageHandler'; - -// XXX: This component is *not* cross-signing aware. Once everything is -// cross-signing, this component should just go away. -export default createReactClass({ - displayName: 'DeviceVerifyButtons', - - propTypes: { - userId: PropTypes.string.isRequired, - device: PropTypes.object.isRequired, - }, - - getInitialState: function() { - return { - device: this.props.device, - }; - }, - - componentDidMount: function() { - const cli = MatrixClientPeg.get(); - cli.on("deviceVerificationChanged", this.onDeviceVerificationChanged); - }, - - componentWillUnmount: function() { - const cli = MatrixClientPeg.get(); - if (cli) { - cli.removeListener("deviceVerificationChanged", this.onDeviceVerificationChanged); - } - }, - - onDeviceVerificationChanged: function(userId, deviceId, deviceInfo) { - if (userId === this.props.userId && deviceId === this.props.device.deviceId) { - this.setState({ device: deviceInfo }); - } - }, - - onVerifyClick: function() { - const DeviceVerifyDialog = sdk.getComponent('views.dialogs.DeviceVerifyDialog'); - Modal.createTrackedDialog('Device Verify Dialog', '', DeviceVerifyDialog, { - userId: this.props.userId, - device: this.state.device, - }, null, /* priority = */ false, /* static = */ true); - }, - - onUnverifyClick: function() { - MatrixClientPeg.get().setDeviceVerified( - this.props.userId, this.state.device.deviceId, false, - ); - }, - - onBlacklistClick: function() { - MatrixClientPeg.get().setDeviceBlocked( - this.props.userId, this.state.device.deviceId, true, - ); - }, - - onUnblacklistClick: function() { - MatrixClientPeg.get().setDeviceBlocked( - this.props.userId, this.state.device.deviceId, false, - ); - }, - - render: function() { - let blacklistButton = null; let verifyButton = null; - - if (this.state.device.isBlocked()) { - blacklistButton = ( - - ); - } else { - blacklistButton = ( - - ); - } - - if (this.state.device.isVerified()) { - verifyButton = ( - - ); - } else { - verifyButton = ( - - ); - } - - return ( -
    - { verifyButton } - { blacklistButton } -
    - ); - }, -}); diff --git a/src/components/views/rooms/MemberDeviceInfo.js b/src/components/views/rooms/MemberDeviceInfo.js deleted file mode 100644 index dbf0ae0c62..0000000000 --- a/src/components/views/rooms/MemberDeviceInfo.js +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 2016 OpenMarket Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import React from 'react'; -import PropTypes from 'prop-types'; -import * as sdk from '../../../index'; -import { _t } from '../../../languageHandler'; -import classNames from 'classnames'; - -export default class MemberDeviceInfo extends React.Component { - render() { - const DeviceVerifyButtons = sdk.getComponent('elements.DeviceVerifyButtons'); - // XXX: These checks are not cross-signing aware but this component is only used - // from the old, pre-cross-signing memberinfopanel - const iconClasses = classNames({ - mx_MemberDeviceInfo_icon: true, - mx_MemberDeviceInfo_icon_blacklisted: this.props.device.isBlocked(), - mx_MemberDeviceInfo_icon_verified: this.props.device.isVerified(), - mx_MemberDeviceInfo_icon_unverified: this.props.device.isUnverified(), - }); - const indicator = (
    ); - const deviceName = (this.props.device.ambiguous || this.props.showDeviceId) ? - (this.props.device.getDisplayName() ? this.props.device.getDisplayName() : "") + " (" + this.props.device.deviceId + ")" : - this.props.device.getDisplayName(); - - // add the deviceId as a titletext to help with debugging - return ( -
    - { indicator } -
    -
    - { deviceName } -
    -
    - -
    - ); - } -} - -MemberDeviceInfo.displayName = 'MemberDeviceInfo'; -MemberDeviceInfo.propTypes = { - userId: PropTypes.string.isRequired, - device: PropTypes.object.isRequired, -}; diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 351ebd3be0..d0091935c8 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -35,12 +35,6 @@ "Unable to load! Check your network connectivity and try again.": "Unable to load! Check your network connectivity and try again.", "Dismiss": "Dismiss", "Call Failed": "Call Failed", - "There are unknown sessions in this room: if you proceed without verifying them, it will be possible for someone to eavesdrop on your call.": "There are unknown sessions in this room: if you proceed without verifying them, it will be possible for someone to eavesdrop on your call.", - "Review Sessions": "Review Sessions", - "Call Anyway": "Call Anyway", - "Answer Anyway": "Answer Anyway", - "Call": "Call", - "Answer": "Answer", "Call Timeout": "Call Timeout", "The remote side failed to pick up": "The remote side failed to pick up", "Call failed due to misconfigured server": "Call failed due to misconfigured server", @@ -75,8 +69,6 @@ "Enter passphrase": "Enter passphrase", "Cancel": "Cancel", "Setting up keys": "Setting up keys", - "Send anyway": "Send anyway", - "Send": "Send", "Sun": "Sun", "Mon": "Mon", "Tue": "Tue", @@ -1009,7 +1001,6 @@ "Invite only": "Invite only", "Scroll to most recent messages": "Scroll to most recent messages", "Close preview": "Close preview", - "device id: ": "device id: ", "and %(count)s others...|other": "and %(count)s others...", "and %(count)s others...|one": "and one other...", "Invite to this room": "Invite to this room", @@ -1419,10 +1410,6 @@ "Popout widget": "Popout widget", "More options": "More options", "Create new room": "Create new room", - "Unblacklist": "Unblacklist", - "Blacklist": "Blacklist", - "Unverify": "Unverify", - "Verify...": "Verify...", "Join": "Join", "No results": "No results", "Please create a new issue on GitHub so that we can investigate this bug.": "Please create a new issue on GitHub so that we can investigate this bug.", @@ -1596,22 +1583,8 @@ "Deactivating your account does not by default cause us to forget messages you have sent. If you would like us to forget your messages, please tick the box below.": "Deactivating your account does not by default cause us to forget messages you have sent. If you would like us to forget your messages, please tick the box below.", "Message visibility in Matrix is similar to email. Our forgetting your messages means that messages you have sent will not be shared with any new or unregistered users, but registered users who already have access to these messages will still have access to their copy.": "Message visibility in Matrix is similar to email. Our forgetting your messages means that messages you have sent will not be shared with any new or unregistered users, but registered users who already have access to these messages will still have access to their copy.", "Please forget all messages I have sent when my account is deactivated (Warning: this will cause future users to see an incomplete view of conversations)": "Please forget all messages I have sent when my account is deactivated (Warning: this will cause future users to see an incomplete view of conversations)", - "Verify session": "Verify session", - "Use Legacy Verification (for older clients)": "Use Legacy Verification (for older clients)", - "Verify by comparing a short text string.": "Verify by comparing a short text string.", - "Begin Verifying": "Begin Verifying", - "Waiting for partner to accept...": "Waiting for partner to accept...", - "Nothing appearing? Not all clients support interactive verification yet. .": "Nothing appearing? Not all clients support interactive verification yet. .", - "Waiting for %(userId)s to confirm...": "Waiting for %(userId)s to confirm...", - "To verify that this session can be trusted, please check that the key you see in User Settings on that device matches the key below:": "To verify that this session can be trusted, please check that the key you see in User Settings on that device matches the key below:", - "To verify that this session can be trusted, please contact its owner using some other means (e.g. in person or a phone call) and ask them whether the key they see in their User Settings for this session matches the key below:": "To verify that this session can be trusted, please contact its owner using some other means (e.g. in person or a phone call) and ask them whether the key they see in their User Settings for this session matches the key below:", - "Use two-way text verification": "Use two-way text verification", - "Session name": "Session name", - "Session ID": "Session ID", - "Session key": "Session key", - "If it matches, press the verify button below. If it doesn't, then someone else is intercepting this session and you probably want to press the blacklist button instead.": "If it matches, press the verify button below. If it doesn't, then someone else is intercepting this session and you probably want to press the blacklist button instead.", - "I verify that the keys match": "I verify that the keys match", "Back": "Back", + "Send": "Send", "Send Custom Event": "Send Custom Event", "You must specify an event type!": "You must specify an event type!", "Event sent!": "Event sent!", @@ -1653,13 +1626,6 @@ "Start a conversation with someone using their name, username (like ) or email address.": "Start a conversation with someone using their name, username (like ) or email address.", "Go": "Go", "Invite someone using their name, username (like ), email address or share this room.": "Invite someone using their name, username (like ), email address or share this room.", - "You added a new session '%(displayName)s', which is requesting encryption keys.": "You added a new session '%(displayName)s', which is requesting encryption keys.", - "Your unverified session '%(displayName)s' is requesting encryption keys.": "Your unverified session '%(displayName)s' is requesting encryption keys.", - "Start verification": "Start verification", - "Share without verifying": "Share without verifying", - "Ignore request": "Ignore request", - "Loading session info...": "Loading session info...", - "Encryption key request": "Encryption key request", "a new master key signature": "a new master key signature", "a new cross-signing key signature": "a new cross-signing key signature", "a device cross-signing signature": "a device cross-signing signature", @@ -1682,7 +1648,11 @@ "Are you sure you want to sign out?": "Are you sure you want to sign out?", "Confirm by comparing the following with the User Settings in your other session:": "Confirm by comparing the following with the User Settings in your other session:", "Confirm this user's session by comparing the following with their User Settings:": "Confirm this user's session by comparing the following with their User Settings:", + "Session name": "Session name", + "Session ID": "Session ID", + "Session key": "Session key", "If they don't match, the security of your communication may be compromised.": "If they don't match, the security of your communication may be compromised.", + "Verify session": "Verify session", "Your homeserver doesn't seem to support this feature.": "Your homeserver doesn't seem to support this feature.", "Message edits": "Message edits", "Your account is not secure": "Your account is not secure", @@ -1768,11 +1738,6 @@ "Summary": "Summary", "Document": "Document", "Next": "Next", - "You are currently blacklisting unverified sessions; to send messages to these sessions you must verify them.": "You are currently blacklisting unverified sessions; to send messages to these sessions you must verify them.", - "We recommend you go through the verification process for each session to confirm they belong to their legitimate owner, but you can resend the message without verifying if you prefer.": "We recommend you go through the verification process for each session to confirm they belong to their legitimate owner, but you can resend the message without verifying if you prefer.", - "Room contains unknown sessions": "Room contains unknown sessions", - "\"%(RoomName)s\" contains sessions that you haven't seen before.": "\"%(RoomName)s\" contains sessions that you haven't seen before.", - "Unknown sessions": "Unknown sessions", "Upload files (%(current)s of %(total)s)": "Upload files (%(current)s of %(total)s)", "Upload files": "Upload files", "Upload all": "Upload all", @@ -2035,8 +2000,6 @@ "Find a room… (e.g. %(exampleRoom)s)": "Find a room… (e.g. %(exampleRoom)s)", "If you can't find the room you're looking for, ask for an invite or Create a new room.": "If you can't find the room you're looking for, ask for an invite or Create a new room.", "Explore rooms": "Explore rooms", - "Message not sent due to unknown sessions being present": "Message not sent due to unknown sessions being present", - "Show sessions, send anyway or cancel.": "Show sessions, send anyway or cancel.", "You can't send any messages until you review and agree to our terms and conditions.": "You can't send any messages until you review and agree to our terms and conditions.", "Your message wasn't sent because this homeserver has hit its Monthly Active User Limit. Please contact your service administrator to continue using the service.": "Your message wasn't sent because this homeserver has hit its Monthly Active User Limit. Please contact your service administrator to continue using the service.", "Your message wasn't sent because this homeserver has exceeded a resource limit. Please contact your service administrator to continue using the service.": "Your message wasn't sent because this homeserver has exceeded a resource limit. Please contact your service administrator to continue using the service.",