signal-desktop/ts/util/isLinkAndSyncEnabled.ts
2024-10-21 13:06:22 -07:00

15 lines
479 B
TypeScript

// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { isTestOrMockEnvironment } from '../environment';
import { isStagingServer } from './isStagingServer';
import { everDone as wasRegistrationEverDone } from './registration';
export function isLinkAndSyncEnabled(): boolean {
// Cannot overwrite existing message history
if (wasRegistrationEverDone()) {
return false;
}
return isStagingServer() || isTestOrMockEnvironment();
}