Skip to content

Commit

Permalink
feat: Add feature flag for remove group (#18274)
Browse files Browse the repository at this point in the history
  • Loading branch information
przemvs authored Nov 5, 2024
1 parent f8cb8f7 commit fafd73d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions server/config/client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export function generateConfig(params: ConfigGeneratorParams, env: Env) {
CHECK_CONSENT: env.FEATURE_CHECK_CONSENT != 'false',
CONFERENCE_AUTO_MUTE: env.FEATURE_CONFERENCE_AUTO_MUTE == 'true',
ENABLE_IN_CALL_REACTIONS: env.FEATURE_ENABLE_IN_CALL_REACTIONS == 'true',
ENABLE_REMOVE_GROUP_CONVERSATION: env.FEATURE_ENABLE_REMOVE_GROUP_CONVERSATION == 'true',
ENABLE_DETACHED_CALLING_WINDOW: env.FEATURE_ENABLE_DETACHED_CALLING_WINDOW == 'true',
ENABLE_TEAM_CREATION: env.FEATURE_ENABLE_TEAM_CREATION == 'true',
DEFAULT_LOGIN_TEMPORARY_CLIENT: env.FEATURE_DEFAULT_LOGIN_TEMPORARY_CLIENT == 'true',
Expand Down
3 changes: 3 additions & 0 deletions server/config/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ export type Env = {
/** Feature to enable in call reactions */
FEATURE_ENABLE_IN_CALL_REACTIONS: string;

/** Feature to enable remove conversation locally */
FEATURE_ENABLE_REMOVE_GROUP_CONVERSATION: string;

/** Feature to enable calling popout window */
FEATURE_ENABLE_DETACHED_CALLING_WINDOW: string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import * as Icon from 'Components/Icon';
import {MenuItem} from 'Components/panel/PanelActions';
import {t} from 'Util/LocalizerUtil';

import {Config} from '../../../../Config';
import {ConversationRepository} from '../../../../conversation/ConversationRepository';
import {Conversation} from '../../../../entity/Conversation';
import * as UserPermission from '../../../../user/UserPermission';
Expand Down Expand Up @@ -164,7 +165,10 @@ const getConversationActions = ({
},
},
{
condition: conversationEntity.isGroup() && conversationEntity.isSelfUserRemoved(),
condition:
conversationEntity.isGroup() &&
conversationEntity.isSelfUserRemoved() &&
Config.getConfig().FEATURE.ENABLE_REMOVE_GROUP_CONVERSATION,
item: {
click: () => actionsViewModel.removeConversation(conversationEntity),
Icon: Icon.CloseIcon,
Expand Down

0 comments on commit fafd73d

Please sign in to comment.