signal-desktop/ts/util/isLinkAndSyncEnabled.ts

15 lines
401 B
TypeScript
Raw Normal View History

2024-10-18 10:15:03 -07:00
// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
2025-01-22 15:09:22 -06:00
import { isProduction } from './version';
2024-10-18 10:15:03 -07:00
import { everDone as wasRegistrationEverDone } from './registration';
2024-10-22 11:49:44 -07:00
export function isLinkAndSyncEnabled(version: string): boolean {
2024-10-18 10:15:03 -07:00
// Cannot overwrite existing message history
if (wasRegistrationEverDone()) {
return false;
}
2025-01-22 15:09:22 -06:00
return !isProduction(version);
2024-10-18 10:15:03 -07:00
}