diff --git a/src/Resend.js b/src/Resend.js index e67c812b7c..21da1c173b 100644 --- a/src/Resend.js +++ b/src/Resend.js @@ -32,7 +32,8 @@ module.exports = { if (err.name === "UnknownDeviceError") { var UnknownDeviceDialog = sdk.getComponent("dialogs.UnknownDeviceDialog"); Modal.createDialog(UnknownDeviceDialog, { - devices: err.devices + devices: err.devices, + room: MatrixClientPeg.get().getRoom(event.getRoomId()), }); } diff --git a/src/components/views/dialogs/UnknownDeviceDialog.js b/src/components/views/dialogs/UnknownDeviceDialog.js index 8e04414b9c..bd23427d2b 100644 --- a/src/components/views/dialogs/UnknownDeviceDialog.js +++ b/src/components/views/dialogs/UnknownDeviceDialog.js @@ -22,6 +22,7 @@ module.exports = React.createClass({ displayName: 'UnknownEventDialog', propTypes: { + room: React.PropTypes.object.isRequired, devices: React.PropTypes.object.isRequired, onFinished: React.PropTypes.func.isRequired, }, @@ -35,6 +36,15 @@ module.exports = React.createClass({ }, render: function() { + var client = MatrixClientPeg.get(); + var warning; + if (client.getGlobalBlacklistUnverifiedDevices() || room.getBlacklistUnverifiedDevices()) { + 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.

; + } + return (
@@ -42,7 +52,7 @@ module.exports = React.createClass({

This room contains unknown devices which have not been verified.

-

We strongly recommend you verify them before continuing.

+ { warning }

Unknown devices: