/* Copyright 2015, 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. */ var React = require("react"); var sdk = require('../../../index'); var MatrixClientPeg = require("../../../MatrixClientPeg"); module.exports = React.createClass({ displayName: 'UnknownEventDialog', propTypes: { room: React.PropTypes.object.isRequired, devices: React.PropTypes.object.isRequired, onFinished: React.PropTypes.func.isRequired, }, onKeyDown: function(e) { if (e.keyCode === 27) { // escape e.stopPropagation(); e.preventDefault(); this.props.onFinished(false); } }, 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 (
Room contains unknown devices

This room contains unknown devices which have not been verified.

{ warning }

Unknown devices:

); // 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... } });