mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-25 02:48:23 +01:00
Fix handling attachment thumbnails using thumbnail key
This commit is contained in:
@@ -157,8 +157,17 @@ exports._mapQuotedAttachments = upgradeAttachment => async (message, context) =>
|
||||
return message;
|
||||
}
|
||||
|
||||
const upgradeWithContext = attachment =>
|
||||
upgradeAttachment(attachment, context);
|
||||
const upgradeWithContext = async (attachment) => {
|
||||
if (!attachment || !attachment.thumbnail) {
|
||||
return attachment;
|
||||
}
|
||||
|
||||
const thumbnail = await upgradeAttachment(attachment.thumbnail, context);
|
||||
return Object.assign({}, attachment, {
|
||||
thumbnail,
|
||||
});
|
||||
};
|
||||
|
||||
const quotedAttachments = (message.quote && message.quote.attachments) || [];
|
||||
|
||||
const attachments = await Promise.all(quotedAttachments.map(upgradeWithContext));
|
||||
|
||||
Reference in New Issue
Block a user