Ensure message is saved after queueing attachment downloads

This commit is contained in:
trevor-signal 2024-08-08 16:32:11 -04:00 committed by GitHub
parent f363836ab5
commit d18888a53d
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;
}