Ensure message is saved after queueing attachment downloads

This commit is contained in:
automated-signal 2024-08-09 09:01:18 -05:00 committed by GitHub
parent 778b367dd8
commit 184b435714
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 9 deletions

View file

@ -180,18 +180,11 @@ export class AttachmentDownloadManager extends JobManager<CoreAttachmentDownload
const newJob = parseResult.data;
const { isAlreadyRunning } = await this._addJob(newJob, {
await this._addJob(newJob, {
forceStart: urgency === AttachmentDownloadUrgency.IMMEDIATE,
});
if (isAlreadyRunning) {
return attachment;
}
return {
...attachment,
pending: !this.params.shouldHoldOffOnStartingQueuedJobs?.(),
};
return attachment;
}
updateVisibleTimelineMessages(messageIds: Array<string>): void {

View file

@ -1348,6 +1348,8 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
}
this.set(value);
queueUpdateMessage(this.attributes);
return true;
}