diff --git a/app/src/main/java/com/nextcloud/talk/models/json/conversations/Conversation.kt b/app/src/main/java/com/nextcloud/talk/models/json/conversations/Conversation.kt index d3294fe84..676ead406 100644 --- a/app/src/main/java/com/nextcloud/talk/models/json/conversations/Conversation.kt +++ b/app/src/main/java/com/nextcloud/talk/models/json/conversations/Conversation.kt @@ -22,9 +22,7 @@ import com.nextcloud.talk.models.json.converters.EnumParticipantTypeConverter import com.nextcloud.talk.models.json.converters.EnumReadOnlyConversationConverter import com.nextcloud.talk.models.json.converters.EnumRoomTypeConverter import com.nextcloud.talk.models.json.participants.Participant.ParticipantType -import com.nextcloud.talk.utils.SpreedFeatures import com.nextcloud.talk.utils.ConversationUtils -import com.nextcloud.talk.utils.CapabilitiesUtil import kotlinx.parcelize.Parcelize @Parcelize @@ -173,22 +171,12 @@ data class Conversation( ParticipantType.GUEST_MODERATOR == participantType || ParticipantType.MODERATOR == participantType - @Deprecated("Use ConversationUtil") - private fun isLockedOneToOne(conversationUser: User): Boolean { - return type == ConversationType.ROOM_TYPE_ONE_TO_ONE_CALL && - CapabilitiesUtil.hasSpreedFeatureCapability( - conversationUser.capabilities?.spreedCapability!!, - SpreedFeatures.LOCKED_ONE_TO_ONE_ROOMS - ) - } - @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))