@@ -80,7 +80,7 @@ class GroupConversationDetailsViewModel @Inject constructor(
8080 private val isMLSEnabled : IsMLSEnabledUseCase ,
8181 refreshUsersWithoutMetadata : RefreshUsersWithoutMetadataUseCase ,
8282 private val isWireCellsEnabled : IsWireCellsEnabledUseCase ,
83- private val observeIsAppsAllowedForUsage : ObserveIsAppsAllowedForUsageUseCase ,
83+ private val observeIsAppsAllowedForUsage : ObserveIsAppsAllowedForUsageUseCase
8484) : GroupConversationParticipantsViewModel(savedStateHandle, observeConversationMembers, refreshUsersWithoutMetadata),
8585 ActionsManager <GroupConversationDetailsViewAction > by ActionsManagerImpl () {
8686
@@ -132,6 +132,10 @@ class GroupConversationDetailsViewModel @Inject constructor(
132132 val channelPermissionType = groupDetails.getChannelPermissionType()
133133 val channelAccessType = groupDetails.getChannelAccessType()
134134
135+ // todo: WPB-21835: ignoring feature flag, and based on protocol until there is finalized apps support.
136+ // isAppsUsageAllowed should be consider then.
137+ val isMLSConversation = groupDetails.conversation.protocol is Conversation .ProtocolInfo .MLS
138+
135139 _isFetchingInitialData .value = false
136140
137141 updateState(
@@ -146,8 +150,8 @@ class GroupConversationDetailsViewModel @Inject constructor(
146150 isUpdatingNameAllowed = canSelfPerformAdminTasks && ! isSelfExternalMember,
147151 isUpdatingGuestAllowed = canSelfPerformAdminTasks && isSelfInTeamThatOwnsConversation,
148152 isUpdatingChannelAccessAllowed = canSelfPerformAdminTasks && isSelfInTeamThatOwnsConversation,
149- isServicesAllowed = groupDetails.conversation.isServicesAllowed() && isAppsUsageAllowed ,
150- isUpdatingServicesAllowed = canSelfPerformAdminTasks && isAppsUsageAllowed ,
153+ isServicesAllowed = groupDetails.conversation.isServicesAllowed() && ! isMLSConversation ,
154+ isUpdatingServicesAllowed = canSelfPerformAdminTasks && isSelfInTeamThatOwnsConversation && ! isMLSConversation ,
151155 isUpdatingReadReceiptAllowed = canSelfPerformAdminTasks && groupDetails.conversation.isTeamGroup(),
152156 isUpdatingSelfDeletingAllowed = canSelfPerformAdminTasks,
153157 mlsEnabled = isMLSEnabled(),
0 commit comments