signal-desktop/ts/util/isLinkAndSyncEnabled.ts

16 lines
479 B
TypeScript
Raw Normal View History

2024-10-18 17:15:03 +00:00
// 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';
2024-10-21 20:06:22 +00:00
export function isLinkAndSyncEnabled(): boolean {
2024-10-18 17:15:03 +00:00
// Cannot overwrite existing message history
if (wasRegistrationEverDone()) {
return false;
}
2024-10-21 20:06:22 +00:00
return isStagingServer() || isTestOrMockEnvironment();
2024-10-18 17:15:03 +00:00
}