From a370a6eb0a8b0db852cf977a5f3eae751dcfcadb Mon Sep 17 00:00:00 2001 From: trevor-signal <131492920+trevor-signal@users.noreply.github.com> Date: Fri, 22 Nov 2024 17:03:11 -0500 Subject: [PATCH] Improve handling of DOE messages in backups --- ts/services/backups/export.ts | 2 +- ts/services/backups/import.ts | 1 + ts/test-electron/backup/non_bubble_test.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ts/services/backups/export.ts b/ts/services/backups/export.ts index 6f90fd9f439d..c45edd225553 100644 --- a/ts/services/backups/export.ts +++ b/ts/services/backups/export.ts @@ -1078,7 +1078,7 @@ export class BackupExportStream extends Readable { message, backupLevel, }); - } else if (message.isErased) { + } else if (message.deletedForEveryone) { result.remoteDeletedMessage = {}; } else if (messageHasPaymentEvent(message)) { const { payment } = message; diff --git a/ts/services/backups/import.ts b/ts/services/backups/import.ts index 9388e803fe74..b66f2f82b751 100644 --- a/ts/services/backups/import.ts +++ b/ts/services/backups/import.ts @@ -1891,6 +1891,7 @@ export class BackupImportStream extends Writable { return { message: { isErased: true, + deletedForEveryone: true, }, additionalMessages: [], }; diff --git a/ts/test-electron/backup/non_bubble_test.ts b/ts/test-electron/backup/non_bubble_test.ts index 109162a61bfd..182c65d16de1 100644 --- a/ts/test-electron/backup/non_bubble_test.ts +++ b/ts/test-electron/backup/non_bubble_test.ts @@ -405,6 +405,7 @@ describe('backup/non-bubble messages', () => { seenStatus: SeenStatus.Unseen, unidentifiedDeliveryReceived: true, isErased: true, + deletedForEveryone: true, }, ]); });