Allow backfill for more undownloadable attachments

This commit is contained in:
Fedor Indutny 2025-03-26 11:48:28 -07:00 committed by GitHub
commit 427f91f903
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 98 additions and 49 deletions

View file

@ -3825,6 +3825,16 @@ export default class MessageReceiver
logId
);
strictAssert(
targetMessage != null,
'MessageReceiver.handleAttachmentBackfillResponse: invalid target message'
);
strictAssert(
targetConversation != null,
'MessageReceiver.handleAttachmentBackfillResponse: ' +
'invalid target conversation'
);
let eventData: AttachmentBackfillResponseSyncEventData;
if (response.error != null) {
eventData = {
@ -3833,16 +3843,6 @@ export default class MessageReceiver
targetConversation,
};
} else {
strictAssert(
targetMessage != null,
'MessageReceiver.handleAttachmentBackfillResponse: invalid target message'
);
strictAssert(
targetConversation != null,
'MessageReceiver.handleAttachmentBackfillResponse: ' +
'invalid target conversation'
);
const { attachments } = response;
strictAssert(
attachments != null,