signal-desktop/ts/util/isBackupEnabled.ts
Scott Nonnenberg fe9d042e40
Introduce the new Settings tab
Co-authored-by: Jamie Kyle <jamie@signal.org>
Co-authored-by: Fedor Indutny <indutny@signal.org>
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
2025-05-14 20:58:20 -07:00

22 lines
712 B
TypeScript

// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import * as RemoteConfig from '../RemoteConfig';
import { isTestOrMockEnvironment } from '../environment';
import { isStagingServer } from './isStagingServer';
export function isBackupFeatureEnabled(): boolean {
if (isStagingServer() || isTestOrMockEnvironment()) {
return true;
}
return Boolean(RemoteConfig.isEnabled('desktop.backup.credentialFetch'));
}
export function isBackupFeatureEnabledForRedux(
config: RemoteConfig.ConfigMapType | undefined
): boolean {
if (isStagingServer() || isTestOrMockEnvironment()) {
return true;
}
return Boolean(config?.['desktop.backup.credentialFetch']?.enabled);
}