Skip to content

Commit

Permalink
chore: restore default api v7 and MLS env variable removal (#18485)
Browse files Browse the repository at this point in the history
* Chore: restore "chore: set default api to v7 (#18478)" (#18483)"

This reverts commit 34383fc.

* chore: restore "feat: remove the environmental mls feature flag (#18479)" (#18484)"

This reverts commit d392567.
  • Loading branch information
V-Gira authored Dec 12, 2024
1 parent d392567 commit ad9574f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 14 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 @@ -63,7 +63,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
2 changes: 1 addition & 1 deletion src/script/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const config = {
ALLOWED_IMAGE_TYPES: ['image/bmp', 'image/gif', 'image/jpeg', 'image/jpg', 'image/png'],

/** Which min and max version of the backend api do we support */
SUPPORTED_API_RANGE: [1, env.ENABLE_DEV_BACKEND_API ? Infinity : 6],
SUPPORTED_API_RANGE: [1, env.ENABLE_DEV_BACKEND_API ? Infinity : 7],

/** DataDog client api keys acces */
dataDog: {
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 ad9574f

Please sign in to comment.