diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 3d676a793d..696d15f84a 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -493,10 +493,39 @@ module.exports = React.createClass({ // called when state.room is first initialised (either at initial load, // after a successful peek, or after we join the room). _onRoomLoaded: function(room) { + this._warnAboutEncryption(room); this._calculatePeekRules(room); this._updatePreviewUrlVisibility(room); }, + _warnAboutEncryption: function (room) { + if (!MatrixClientPeg.get().isRoomEncrypted(room.roomId)) { + return; + } + let userHasUsedEncryption = false; + if (localStorage) { + userHasUsedEncryption = localStorage.getItem('mx_user_has_used_encryption'); + } + if (!userHasUsedEncryption) { + const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog"); + Modal.createDialog(QuestionDialog, { + title: "Warning!", + hasCancelButton: false, + description: ( +
End-to-end encryption is in beta and may not be reliable.
+You should not yet trust it to secure data.
+Devices will not yet be able to decrypt history from before they joined the room.
+Encrypted messages will not be visible on clients that do not yet implement encryption.
+