Ensure old attachments with .id field only are handled

This commit is contained in:
Scott Nonnenberg 2020-04-20 11:22:12 -07:00
parent a0e9791623
commit aaa91c441b
2 changed files with 5 additions and 1 deletions

View file

@ -188,6 +188,10 @@ async function _runJob(job) {
}
try {
if (attachment.id) {
// eslint-disable-next-line no-param-reassign
attachment.cdnId = attachment.id;
}
downloaded = await messageReceiver.downloadAttachment(attachment);
} catch (error) {
// Attachments on the server expire after 30 days, then start returning 404