summary refs log tree commit diff
path: root/resources/qml/MessageInput.qml
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-05-02 18:01:18 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-05-02 18:06:56 +0200
commitab0baf5d9eb3319f8d3da15bd966ab8ab2810fce (patch)
treecba4d1153ec3e8573e8a6821d3e6b07d771fdccd /resources/qml/MessageInput.qml
parentFix crash when you have no rooms and open the global user profile (diff)
downloadnheko-ab0baf5d9eb3319f8d3da15bd966ab8ab2810fce.tar.xz
Only show actions, when you have permissions to do them
Diffstat (limited to 'resources/qml/MessageInput.qml')
-rw-r--r--resources/qml/MessageInput.qml8
1 files changed, 8 insertions, 0 deletions
diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml
index 5bb699dd..c5dfbfa3 100644
--- a/resources/qml/MessageInput.qml
+++ b/resources/qml/MessageInput.qml
@@ -28,6 +28,7 @@ Rectangle {
     RowLayout {
         id: row
 
+        visible: (TimelineManager.timeline ? TimelineManager.timeline.permissions.canSend(MtxEvent.TextMessage) : false) || messageContextMenu.isSender
         anchors.fill: parent
 
         ImageButton {
@@ -352,4 +353,11 @@ Rectangle {
 
     }
 
+    Text {
+        anchors.centerIn: parent
+        visible: TimelineManager.timeline ? (!TimelineManager.timeline.permissions.canSend(MtxEvent.TextMessage)) : false
+        text: qsTr("You don't have permission to send messages in this room")
+        color: colors.text
+    }
+
 }