From 2ec79f571288d52481232f640f28685e31eed63f Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Mon, 21 Oct 2024 13:06:22 -0700 Subject: [PATCH] Disable link-and-sync in Alpha --- ts/state/ducks/installer.ts | 2 +- ts/textsecure/Provisioner.ts | 7 ++----- ts/util/isLinkAndSyncEnabled.ts | 5 ++--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/ts/state/ducks/installer.ts b/ts/state/ducks/installer.ts index 0d4f170ff092..8f56ec09cd50 100644 --- a/ts/state/ducks/installer.ts +++ b/ts/state/ducks/installer.ts @@ -196,7 +196,7 @@ function startInstaller(): ThunkAction< const { server } = window.textsecure; strictAssert(server, 'Expected a server'); - const provisioner = new Provisioner(server, window.getVersion()); + const provisioner = new Provisioner(server); const abortController = new AbortController(); const { signal } = abortController; diff --git a/ts/textsecure/Provisioner.ts b/ts/textsecure/Provisioner.ts index 1b462dd04081..675cf870ac14 100644 --- a/ts/textsecure/Provisioner.ts +++ b/ts/textsecure/Provisioner.ts @@ -78,10 +78,7 @@ export class Provisioner { private state: StateType = { step: Step.Idle }; private wsr: IWebSocketResource | undefined; - constructor( - private readonly server: WebAPIType, - private readonly appVersion: string - ) {} + constructor(private readonly server: WebAPIType) {} public close(error = new Error('Provisioner closed')): void { try { @@ -245,7 +242,7 @@ export class Provisioner { .toAppUrl({ uuid, pubKey: Bytes.toBase64(pubKey), - capabilities: isLinkAndSyncEnabled(this.appVersion) ? ['backup'] : [], + capabilities: isLinkAndSyncEnabled() ? ['backup'] : [], }) .toString(); diff --git a/ts/util/isLinkAndSyncEnabled.ts b/ts/util/isLinkAndSyncEnabled.ts index a7fbe6472ff0..e02fd4387d05 100644 --- a/ts/util/isLinkAndSyncEnabled.ts +++ b/ts/util/isLinkAndSyncEnabled.ts @@ -3,14 +3,13 @@ import { isTestOrMockEnvironment } from '../environment'; import { isStagingServer } from './isStagingServer'; -import { isAlpha } from './version'; import { everDone as wasRegistrationEverDone } from './registration'; -export function isLinkAndSyncEnabled(version: string): boolean { +export function isLinkAndSyncEnabled(): boolean { // Cannot overwrite existing message history if (wasRegistrationEverDone()) { return false; } - return isStagingServer() || isTestOrMockEnvironment() || isAlpha(version); + return isStagingServer() || isTestOrMockEnvironment(); }