Skip to content

Commit

Permalink
feat: remove the environmental mls feature flag (#18479)
Browse files Browse the repository at this point in the history
  • Loading branch information
aweiss-dev authored and V-Gira committed Dec 11, 2024
1 parent c42c813 commit d309d8d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 13 deletions.
1 change: 0 additions & 1 deletion .env.localhost
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ ENABLE_DEV_BACKEND_API="true"
#FEATURE_DEFAULT_LOGIN_TEMPORARY_CLIENT="false"
#FEATURE_APPLOCK_UNFOCUS_TIMEOUT="30"
#FEATURE_APPLOCK_SCHEDULED_TIMEOUT="30"
#FEATURE_ENABLE_MLS="true"
#FEATURE_USE_CORE_CRYPTO="true"

# staging
Expand Down
1 change: 0 additions & 1 deletion server/config/client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export function generateConfig(params: ConfigGeneratorParams, env: Env) {
ENABLE_ENFORCE_DESKTOP_APPLICATION_ONLY: env.FEATURE_ENABLE_ENFORCE_DESKTOP_APPLICATION_ONLY == 'true',
ENABLE_EXTRA_CLIENT_ENTROPY: env.FEATURE_ENABLE_EXTRA_CLIENT_ENTROPY == 'true',
ENABLE_MEDIA_EMBEDS: env.FEATURE_ENABLE_MEDIA_EMBEDS != 'false',
ENABLE_MLS: env.FEATURE_ENABLE_MLS == 'true',
ENABLE_PROTEUS_CORE_CRYPTO: env.FEATURE_ENABLE_PROTEUS_CORE_CRYPTO == 'true',
ENABLE_SSO: env.FEATURE_ENABLE_SSO == 'true',
ENFORCE_CONSTANT_BITRATE: env.FEATURE_ENFORCE_CONSTANT_BITRATE == 'true',
Expand Down
2 changes: 0 additions & 2 deletions server/config/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ export type Env = {
FEATURE_ALLOWED_FILE_UPLOAD_EXTENSIONS: string;

/** will enable the MLS protocol */
FEATURE_ENABLE_MLS?: string;

FEATURE_USE_CORE_CRYPTO?: string;

FEATURE_MLS_CONFIG_KEYING_MATERIAL_UPDATE_THRESHOLD?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,12 @@ const GroupCreationModal: React.FC<GroupCreationModalProps> = ({
} = useKoSubscribableChildren(teamState, ['isTeam', 'isMLSEnabled', 'isProtocolToggleEnabledForUser']);
const {self: selfUser} = useKoSubscribableChildren(userState, ['self']);

const isMLSFeatureEnabled = Config.getConfig().FEATURE.ENABLE_MLS;

const enableMLSToggle = isMLSFeatureEnabled && isMLSEnabledForTeam && isProtocolToggleEnabledForUser;
const enableMLSToggle = isMLSEnabledForTeam && isProtocolToggleEnabledForUser;

//if feature flag is set to false or mls is disabled for current team use proteus as default
const defaultProtocol =
isMLSFeatureEnabled && isMLSEnabledForTeam
? teamState.teamFeatures()?.mls?.config.defaultProtocol
: ConversationProtocol.PROTEUS;
const defaultProtocol = isMLSEnabledForTeam
? teamState.teamFeatures()?.mls?.config.defaultProtocol
: ConversationProtocol.PROTEUS;

const protocolOptions: ProtocolOption[] = ([ConversationProtocol.PROTEUS, ConversationProtocol.MLS] as const).map(
protocol => ({
Expand Down
3 changes: 1 addition & 2 deletions src/script/util/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {Runtime} from '@wireapp/commons';
import {isTabKey} from './KeyboardUtil';
import {getLogger} from './Logger';

import {Config} from '../Config';
import type {Conversation} from '../entity/Conversation';
import {AuthError} from '../error/AuthError';

Expand Down Expand Up @@ -304,7 +303,7 @@ export const setContextMenuPosition = (event: React.KeyboardEvent) => {
const supportsSecretStorage = () => !Runtime.isDesktopApp() || !!window.systemCrypto;

// disables mls for old 'broken' desktop clients, see https://github.com/wireapp/wire-desktop/pull/6094
export const supportsMLS = () => Config.getConfig().FEATURE.ENABLE_MLS && supportsSecretStorage();
export const supportsMLS = () => supportsSecretStorage();

export const incomingCssClass = 'content-animation-incoming-horizontal-left';

Expand Down

0 comments on commit d309d8d

Please sign in to comment.