Exclude erased messages from backup

This commit is contained in:
trevor-signal
2026-03-09 15:35:30 -04:00
committed by GitHub
parent f1c5f73b39
commit c7b7a0a9b6
2 changed files with 24 additions and 0 deletions

View File

@@ -1748,6 +1748,8 @@ export class BackupExportStream extends Readable {
} else if (message.pollTerminateNotification) {
// TODO (DESKTOP-9282)
return undefined;
} else if (message.isErased) {
return undefined;
} else {
result.standardMessage = await this.#toStandardMessage({
message,

View File

@@ -603,6 +603,28 @@ describe('backup/bubble messages', () => {
[]
);
});
it('drops erased messages', async () => {
await asymmetricRoundtripHarness(
[
{
conversationId: gv1.id,
id: generateGuid(),
type: 'incoming',
received_at: 3,
received_at_ms: 3,
isErased: true,
sent_at: 3,
timestamp: 3,
sourceServiceId: CONTACT_A,
body: 'd',
readStatus: ReadStatus.Unread,
seenStatus: SeenStatus.Unseen,
unidentifiedDeliveryReceived: true,
},
],
[]
);
});
it('drops messages that expire soon', async () => {
await asymmetricRoundtripHarness(