mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
New attachment storage system
This commit is contained in:
@@ -171,6 +171,10 @@ export function convertBackupMessageAttachmentToAttachment(
|
||||
async function generateNewEncryptionInfoForAttachment(
|
||||
attachment: Readonly<LocallySavedAttachment>
|
||||
): Promise<AttachmentReadyForBackup> {
|
||||
strictAssert(
|
||||
attachment.version !== 2,
|
||||
'generateNewEncryptionInfoForAttachment can only be used on legacy attachments'
|
||||
);
|
||||
const fixedUpAttachment = { ...attachment };
|
||||
|
||||
// Since we are changing the encryption, we need to delete all encryption & location
|
||||
@@ -195,6 +199,8 @@ async function generateNewEncryptionInfoForAttachment(
|
||||
attachment.path
|
||||
),
|
||||
},
|
||||
getAbsoluteAttachmentPath:
|
||||
window.Signal.Migrations.getAbsoluteAttachmentPath,
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user