From ba9f1a3e5ee049c33fda574765455eb5f25ff110 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Wed, 19 Jul 2023 02:03:39 +0200 Subject: [PATCH] Support cds.disableCompatibilityMode --- ts/RemoteConfig.ts | 1 + ts/textsecure/WebAPI.ts | 4 +++- ts/util/getUuidsForE164s.ts | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ts/RemoteConfig.ts b/ts/RemoteConfig.ts index 574b8c51d..b8f785597 100644 --- a/ts/RemoteConfig.ts +++ b/ts/RemoteConfig.ts @@ -14,6 +14,7 @@ import { HashType } from './types/Crypto'; import { getCountryCode } from './types/PhoneNumber'; export type ConfigKeyType = + | 'cds.disableCompatibilityMode' | 'desktop.announcementGroup' | 'desktop.calling.audioLevelForSpeaking' | 'desktop.cdsi.returnAcisWithoutUaks' diff --git a/ts/textsecure/WebAPI.ts b/ts/textsecure/WebAPI.ts index 8c365a93f..2d98b37d3 100644 --- a/ts/textsecure/WebAPI.ts +++ b/ts/textsecure/WebAPI.ts @@ -1522,7 +1522,9 @@ export function initialize({ ...res, config: res.config.filter( ({ name }: { name: string }) => - name.startsWith('desktop.') || name.startsWith('global.') + name.startsWith('desktop.') || + name.startsWith('global.') || + name.startsWith('cds.') ), }; } diff --git a/ts/util/getUuidsForE164s.ts b/ts/util/getUuidsForE164s.ts index 205af79aa..2c26cb00f 100644 --- a/ts/util/getUuidsForE164s.ts +++ b/ts/util/getUuidsForE164s.ts @@ -38,7 +38,9 @@ export async function getUuidsForE164s( accessKeys.push(accessKey); } - const returnAcisWithoutUaks = isEnabled('desktop.cdsi.returnAcisWithoutUaks'); + const returnAcisWithoutUaks = + !isEnabled('cds.disableCompatibilityMode') && + isEnabled('desktop.cdsi.returnAcisWithoutUaks'); log.info( `getUuidsForE164s(${e164s}): acis=${acis.length} ` +