Skip to content

Commit

Permalink
runfix: make supportMLS a function
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrykBuniX committed Oct 19, 2022
1 parent a32154e commit 06ba72d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/script/main/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ class App {

const conversationEntities = await conversationRepository.getConversations();

if (supportsMLS) {
if (supportsMLS()) {
// We send external proposal to all the MLS conversations that are in an unknown state (not established nor pendingWelcome)
await mlsConversationState.getState().sendExternalToPendingJoin(
conversationEntities,
Expand Down
2 changes: 1 addition & 1 deletion src/script/service/CoreSingleton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class Core extends Account<Uint8Array> {

return createStorageEngine(storeName, dbType);
},
mlsConfig: supportsMLS
mlsConfig: supportsMLS()
? {
coreCrypoWasmFilePath: '/min/core-crypto.wasm',
keyingMaterialUpdateThreshold: Config.getConfig().FEATURE.MLS_CONFIG_KEYING_MATERIAL_UPDATE_THRESHOLD,
Expand Down
3 changes: 2 additions & 1 deletion src/script/util/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,4 +400,5 @@ export const getSelectionPosition = (element: HTMLTextAreaElement, currentMentio
};

// temporary hack that disables mls for old 'broken' desktop clients, see https://github.com/wireapp/wire-desktop/pull/6094
export const supportsMLS = Config.getConfig().FEATURE.ENABLE_MLS && (!Runtime.isDesktopApp() || window.systemCrypto);
export const supportsMLS = () =>
Config.getConfig().FEATURE.ENABLE_MLS && (!Runtime.isDesktopApp() || window.systemCrypto);

0 comments on commit 06ba72d

Please sign in to comment.