Allow redaction of message only by admins and authors of the message
Previously you could click on the button but it would do nothing
This commit is contained in:
@@ -9,14 +9,17 @@ import QtQuick.Controls 2.12
|
||||
import NeoChat.Dialog 1.0
|
||||
|
||||
Menu {
|
||||
id: root
|
||||
|
||||
required property var room
|
||||
required property var author
|
||||
|
||||
signal viewSource()
|
||||
signal downloadAndOpen()
|
||||
signal saveFileAs()
|
||||
signal reply()
|
||||
signal redact()
|
||||
|
||||
id: root
|
||||
|
||||
MenuItem {
|
||||
text: i18n("View Source")
|
||||
|
||||
@@ -42,8 +45,8 @@ Menu {
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
visible: room.canSendState("redact") || room.localUser.id === author.id
|
||||
text: i18n("Redact")
|
||||
|
||||
onTriggered: redact()
|
||||
}
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ Kirigami.OverlaySheet {
|
||||
}
|
||||
}
|
||||
Kirigami.BasicListItem {
|
||||
visible: author.id === currentRoom.localUser.id || currentRoom.canSendState("redact")
|
||||
action: Kirigami.Action {
|
||||
text: i18n("Remove")
|
||||
icon.name: "edit-delete-remove"
|
||||
|
||||
Reference in New Issue
Block a user