Use the proper method for pulling attachments off disk for retry
This commit is contained in:
parent
c936859d09
commit
92c071e083
2 changed files with 7 additions and 7 deletions
|
@ -124,8 +124,8 @@ function initializeMigrations({
|
||||||
const attachmentsPath = getPath(userDataPath);
|
const attachmentsPath = getPath(userDataPath);
|
||||||
const readAttachmentData = createReader(attachmentsPath);
|
const readAttachmentData = createReader(attachmentsPath);
|
||||||
const loadAttachmentData = Type.loadData(readAttachmentData);
|
const loadAttachmentData = Type.loadData(readAttachmentData);
|
||||||
const loadPreviewData = MessageType.loadPreviewData(readAttachmentData);
|
const loadPreviewData = MessageType.loadPreviewData(loadAttachmentData);
|
||||||
const loadQuoteData = MessageType.loadQuoteData(readAttachmentData);
|
const loadQuoteData = MessageType.loadQuoteData(loadAttachmentData);
|
||||||
const getAbsoluteAttachmentPath = createAbsolutePathGetter(attachmentsPath);
|
const getAbsoluteAttachmentPath = createAbsolutePathGetter(attachmentsPath);
|
||||||
const deleteOnDisk = Attachments.createDeleter(attachmentsPath);
|
const deleteOnDisk = Attachments.createDeleter(attachmentsPath);
|
||||||
|
|
||||||
|
|
|
@ -469,14 +469,14 @@ exports.loadPreviewData = loadAttachmentData => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return Promise.all(
|
return Promise.all(
|
||||||
preview.map(async () => {
|
preview.map(async item => {
|
||||||
if (!preview.image) {
|
if (!item.image) {
|
||||||
return preview;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...preview,
|
...item,
|
||||||
image: await loadAttachmentData(preview.image),
|
image: await loadAttachmentData(item.image),
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue