mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Ensure that download is no longer pending on abort
This commit is contained in:
@@ -383,6 +383,16 @@ async function runDownloadAttachmentJob({
|
||||
`${logId}: Cancelled attempt ${job.attempts}. Not scheduling a retry. Error:`,
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
// Remove `pending` flag from the attachment. User can retry later.
|
||||
await addAttachmentToMessage(
|
||||
message.id,
|
||||
{
|
||||
...job.attachment,
|
||||
pending: false,
|
||||
},
|
||||
logId,
|
||||
{ type: job.attachmentType }
|
||||
);
|
||||
return { status: 'finished' };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user