fix a bug with preview of messages not being downloaded
This commit is contained in:
parent
4db85a3c01
commit
07b6d7f6f1
|
@ -160,6 +160,7 @@ async function processNormalAttachments(
|
|||
async function processPreviews(message: MessageModel, convo: ConversationModel): Promise<number> {
|
||||
let addedCount = 0;
|
||||
const isOpenGroupV2 = convo.isOpenGroupV2();
|
||||
const openGroupV2Details = (isOpenGroupV2 && convo.toOpenGroupV2()) || undefined;
|
||||
|
||||
const preview = await Promise.all(
|
||||
(message.get('preview') || []).map(async (item: any, index: any) => {
|
||||
|
@ -173,6 +174,7 @@ async function processPreviews(message: MessageModel, convo: ConversationModel):
|
|||
type: 'preview',
|
||||
index,
|
||||
isOpenGroupV2,
|
||||
openGroupV2Details,
|
||||
});
|
||||
|
||||
return { ...item, image };
|
||||
|
@ -196,6 +198,7 @@ async function processQuoteAttachments(
|
|||
return 0;
|
||||
}
|
||||
const isOpenGroupV2 = convo.isOpenGroupV2();
|
||||
const openGroupV2Details = (isOpenGroupV2 && convo.toOpenGroupV2()) || undefined;
|
||||
|
||||
quote.attachments = await Promise.all(
|
||||
quote.attachments.map(async (item: any, index: any) => {
|
||||
|
@ -212,6 +215,7 @@ async function processQuoteAttachments(
|
|||
type: 'quote',
|
||||
index,
|
||||
isOpenGroupV2,
|
||||
openGroupV2Details,
|
||||
});
|
||||
|
||||
return { ...item, thumbnail };
|
||||
|
|
Loading…
Reference in New Issue