fix logic for canModerate

bug was introduced with commit 754b8250

As a result, for example the delete conversation option was not shown.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2024-04-11 13:44:03 +02:00
parent 0062f22a57
commit d93dd0f3c1
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -185,10 +185,9 @@ data class Conversation(
@Deprecated("Use ConversationUtil")
fun canModerate(conversationUser: User): Boolean {
return isParticipantOwnerOrModerator &&
ConversationUtils.isLockedOneToOne(
!ConversationUtils.isLockedOneToOne(
ConversationModel.mapToConversationModel(this),
conversationUser
.capabilities?.spreedCapability!!
conversationUser.capabilities?.spreedCapability!!
) &&
type != ConversationType.FORMER_ONE_TO_ONE &&
!ConversationUtils.isNoteToSelfConversation(ConversationModel.mapToConversationModel(this))