2024-04-22 21:25:56 +00:00
|
|
|
// Copyright 2024 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
import * as RemoteConfig from '../RemoteConfig';
|
2024-10-07 19:58:59 +00:00
|
|
|
import { isTestOrMockEnvironment } from '../environment';
|
2024-09-04 18:12:45 +00:00
|
|
|
import { isStagingServer } from './isStagingServer';
|
2024-04-22 21:25:56 +00:00
|
|
|
|
|
|
|
export function isBackupEnabled(): boolean {
|
2024-10-07 19:58:59 +00:00
|
|
|
if (isStagingServer() || isTestOrMockEnvironment()) {
|
2024-08-08 19:22:48 +00:00
|
|
|
return true;
|
|
|
|
}
|
2024-04-22 21:25:56 +00:00
|
|
|
return Boolean(RemoteConfig.isEnabled('desktop.backup.credentialFetch'));
|
|
|
|
}
|