mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-27 03:43:27 +01:00
Link-and-sync
This commit is contained in:
@@ -134,6 +134,7 @@ type CreatePrimaryDeviceOptionsType = Readonly<{
|
||||
ourAci?: undefined;
|
||||
ourPni?: undefined;
|
||||
userAgent?: undefined;
|
||||
ephemeralBackupKey?: undefined;
|
||||
|
||||
readReceipts: true;
|
||||
|
||||
@@ -149,6 +150,7 @@ export type CreateLinkedDeviceOptionsType = Readonly<{
|
||||
ourAci: AciString;
|
||||
ourPni: PniString;
|
||||
userAgent?: string;
|
||||
ephemeralBackupKey: Uint8Array | undefined;
|
||||
|
||||
readReceipts: boolean;
|
||||
|
||||
@@ -333,6 +335,7 @@ export default class AccountManager extends EventTarget {
|
||||
profileKey,
|
||||
accessKey,
|
||||
masterKey,
|
||||
ephemeralBackupKey: undefined,
|
||||
readReceipts: true,
|
||||
});
|
||||
});
|
||||
@@ -1098,6 +1101,9 @@ export default class AccountManager extends EventTarget {
|
||||
// storage service and message receiver are not operating
|
||||
// until the backup is downloaded and imported.
|
||||
if (isBackupEnabled() && cleanStart) {
|
||||
if (options.type === AccountType.Linked && options.ephemeralBackupKey) {
|
||||
await storage.put('backupEphemeralKey', options.ephemeralBackupKey);
|
||||
}
|
||||
await storage.put('backupDownloadPath', getRelativePath(createName()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user