diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index 113224666d..379f09818f 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -223,8 +223,8 @@ export default class MessageComposer extends React.Component { ); let e2eImg, e2eTitle, e2eClass; - - if (MatrixClientPeg.get().isRoomEncrypted(this.props.room.roomId)) { + const roomIsEncrypted = MatrixClientPeg.get().isRoomEncrypted(this.props.room.roomId); + if (roomIsEncrypted) { // FIXME: show a /!\ if there are untrusted devices in the room... e2eImg = 'img/e2e-verified.svg'; e2eTitle = 'Encrypted room'; @@ -286,12 +286,16 @@ export default class MessageComposer extends React.Component { key="controls_formatting" /> ); + const placeholderText = roomIsEncrypted ? + "Send a message (unencrypted)…" : "Send a message…"; + controls.push( this.messageComposerInput = c} key="controls_input" onResize={this.props.onResize} room={this.props.room} + placeholder={placeholderText} tryComplete={this._tryComplete} onUpArrow={this.onUpArrow} onDownArrow={this.onDownArrow} diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index 9aab174511..61dd1e1b1c 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -721,7 +721,7 @@ export default class MessageComposerInput extends React.Component { title={`Markdown is ${this.state.isRichtextEnabled ? 'disabled' : 'enabled'}`} src={`img/button-md-${!this.state.isRichtextEnabled}.png`} /> -