mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-18 23:49:20 +01:00
Link-and-sync
This commit is contained in:
16
ts/util/isLinkAndSyncEnabled.ts
Normal file
16
ts/util/isLinkAndSyncEnabled.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
// Copyright 2024 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { isTestOrMockEnvironment } from '../environment';
|
||||
import { isStagingServer } from './isStagingServer';
|
||||
import { isAlpha } from './version';
|
||||
import { everDone as wasRegistrationEverDone } from './registration';
|
||||
|
||||
export function isLinkAndSyncEnabled(version: string): boolean {
|
||||
// Cannot overwrite existing message history
|
||||
if (wasRegistrationEverDone()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return isStagingServer() || isTestOrMockEnvironment() || isAlpha(version);
|
||||
}
|
||||
Reference in New Issue
Block a user