mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-02 08:13:37 +01:00
20 lines
535 B
TypeScript
20 lines
535 B
TypeScript
// Copyright 2024 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
import { backupsService } from '../services/backups/index.preload.js';
|
|
import { everDone as wasRegistrationEverDone } from './registration.preload.js';
|
|
|
|
export function isLinkAndSyncEnabled(): boolean {
|
|
// Cannot overwrite existing message history
|
|
if (wasRegistrationEverDone()) {
|
|
return false;
|
|
}
|
|
|
|
// For local backup import testing, prevent link & sync
|
|
if (backupsService.isLocalBackupStaged()) {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|