|
|
|
@ -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 };
|
|
|
|
|