Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add feature flag for remove group #18274

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading