From 7bc3fc86961bf11e1840ff5f9978c17dc7eb03d7 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sun, 22 Jan 2017 01:28:43 +0100 Subject: [PATCH] make UnknownDeviceDialog work again, other than the mess of vector-im/vector-web#3020 --- src/components/structures/UserSettings.js | 2 +- .../views/dialogs/UnknownDeviceDialog.js | 49 ++++++++++--------- .../views/elements/DeviceVerifyButtons.js | 4 +- .../views/rooms/MessageComposerInput.js | 3 +- .../views/rooms/MessageComposerInputOld.js | 3 +- src/components/views/rooms/RoomSettings.js | 2 +- 6 files changed, 33 insertions(+), 30 deletions(-) diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index 1dd30b679c..00219e3bb2 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -60,7 +60,7 @@ const SETTINGS_LABELS = [ const CRYPTO_SETTINGS_LABELS = [ { id: 'blacklistUnverifiedDevices', - label: 'Never send encrypted messages to unverified devices', + label: 'Never send encrypted messages to unverified devices from this device', }, // XXX: this is here for documentation; the actual setting is managed via RoomSettings // { diff --git a/src/components/views/dialogs/UnknownDeviceDialog.js b/src/components/views/dialogs/UnknownDeviceDialog.js index a2e7bd13fb..656f831ba1 100644 --- a/src/components/views/dialogs/UnknownDeviceDialog.js +++ b/src/components/views/dialogs/UnknownDeviceDialog.js @@ -36,14 +36,15 @@ module.exports = React.createClass({ }, render: function() { + var DeviceVerifyButtons = sdk.getComponent('elements.DeviceVerifyButtons'); var client = MatrixClientPeg.get(); - var blacklistUnverified = (client.getGlobalBlacklistUnverifiedDevices() || room.getBlacklistUnverifiedDevices()); + var blacklistUnverified = client.getGlobalBlacklistUnverifiedDevices() || this.props.room.getBlacklistUnverifiedDevices(); var warning; if (blacklistUnverified) { - warning =

You are currently blacklisting unverified devices; to send messages to these devices you must verify them.

; + warning =

You are currently blacklisting unverified devices; to send messages to these devices you must verify them.

} else { - warning =

We strongly recommend you verify them before continuing.

; + warning =

We strongly recommend you verify them before continuing.

} return ( @@ -54,27 +55,27 @@ module.exports = React.createClass({

This room contains unknown devices which have not been verified.

{ warning } -

Unknown devices: -

-

+ Unknown devices: +