Browse Source

fix displaying of message delete-button

this will fix to hide the delete-button when the message is not from the current user and the user not a moderator.
see https://nextcloud-talk.readthedocs.io/en/latest/chat/#deleting-a-chat-message

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Marcel Hibbe 3 years ago
parent
commit
402325ffb5

+ 1 - 1
app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt

@@ -2421,7 +2421,7 @@ class ChatController(args: Bundle) :
         val isUserAllowedByPrivileges = if (message.actorId == conversationUser.userId) {
             true
         } else {
-            currentConversation!!.isParticipantOwnerOrModerator
+            currentConversation!!.canModerate(conversationUser)
         }
         if (!isUserAllowedByPrivileges) return false