From 0bc51627bba8aa135e7509c7f939ffffc695d7dc Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Fri, 21 May 2021 12:20:53 +0200 Subject: [PATCH] Disable sending messages to encrypted rooms --- imports/NeoChat/Component/ChatBox/ChatBar.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/imports/NeoChat/Component/ChatBox/ChatBar.qml b/imports/NeoChat/Component/ChatBox/ChatBar.qml index fb53dad1e..75a4c847d 100644 --- a/imports/NeoChat/Component/ChatBox/ChatBar.qml +++ b/imports/NeoChat/Component/ChatBox/ChatBar.qml @@ -87,10 +87,12 @@ ToolBar { //property int lineHeight: contentHeight / lineCount text: inputFieldText - placeholderText: editEventId.length > 0 ? i18n("Edit Message") : i18n("Write your message...") + placeholderText: currentRoom.usesEncryption ? i18n("This room is encrypted. Sending encrypted messages is not yet supported.") : editEventId.length > 0 ? i18n("Edit Message") : i18n("Write your message...") verticalAlignment: TextEdit.AlignVCenter horizontalAlignment: TextEdit.AlignLeft wrapMode: Text.Wrap + readOnly: currentRoom.usesEncryption + ChatDocumentHandler { id: documentHandler