check capability conversation-creation-all

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2025-04-11 15:11:22 +02:00
parent df7e772817
commit b4a9910fd3
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
2 changed files with 5 additions and 2 deletions

View File

@ -901,7 +901,9 @@ class ConversationInfoActivity :
binding.sharedItems.visibility = GONE binding.sharedItems.visibility = GONE
} }
if (conversation!!.type == ConversationEnums.ConversationType.ROOM_TYPE_ONE_TO_ONE_CALL) { if (conversation!!.type == ConversationEnums.ConversationType.ROOM_TYPE_ONE_TO_ONE_CALL &&
hasSpreedFeatureCapability(spreedCapabilities, SpreedFeatures.CONVERSATION_CREATION_ALL)
) {
binding.addParticipantsAction.visibility = GONE binding.addParticipantsAction.visibility = GONE
binding.startGroupChat.visibility = VISIBLE binding.startGroupChat.visibility = VISIBLE
} else if (ConversationUtils.canModerate(conversationCopy, spreedCapabilities)) { } else if (ConversationUtils.canModerate(conversationCopy, spreedCapabilities)) {

View File

@ -56,7 +56,8 @@ enum class SpreedFeatures(val value: String) {
DELETE_MESSAGES_UNLIMITED("delete-messages-unlimited"), DELETE_MESSAGES_UNLIMITED("delete-messages-unlimited"),
BAN_V1("ban-v1"), BAN_V1("ban-v1"),
EDIT_MESSAGES_NOTE_TO_SELF("edit-messages-note-to-self"), EDIT_MESSAGES_NOTE_TO_SELF("edit-messages-note-to-self"),
ARCHIVE_CONVERSATIONS("archived-conversations-v2") ARCHIVE_CONVERSATIONS("archived-conversations-v2"),
CONVERSATION_CREATION_ALL("conversation-creation-all")
} }
@Suppress("TooManyFunctions") @Suppress("TooManyFunctions")