signal-desktop/ts/util/isLinkAndSyncEnabled.ts
automated-signal 41a730c53a
Add adhoc release channel for public ad-hoc testing
Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
2024-12-13 13:10:52 +10:00

21 lines
606 B
TypeScript

// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { isTestOrMockEnvironment } from '../environment';
import { isStagingServer } from './isStagingServer';
import { isAdhoc, isNightly } 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() ||
isNightly(version) ||
isAdhoc(version)
);
}