|
|
|
@ -96,7 +96,7 @@ export const sentMsgTypeMapped = {
|
|
|
|
|
conversationid: msg.id.split('.')[0],
|
|
|
|
|
type: 'text',
|
|
|
|
|
title: msg.template_origin.components.header?.[0]?.text || '',
|
|
|
|
|
text: templateDataMapped?.body?.text || '', // msg.template_origin.components.body?.[0]?.text || '',
|
|
|
|
|
text: autoLinkText( templateDataMapped?.body?.text || ''), // msg.template_origin.components.body?.[0]?.text || '',
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -247,7 +247,7 @@ export const whatsappMsgTypeMapped = {
|
|
|
|
|
type: 'text',
|
|
|
|
|
data: (msg) => {
|
|
|
|
|
const templateDataMapped = msg.template?.components ? msg.template.components.reduce((r, v) => ({...r, [v.type]: v}), {}) : null;
|
|
|
|
|
return { id: msg.wamid, text: templateDataMapped?.body?.text || templateDataMapped?.body?.parameters?.[0]?.text || '', title: msg.template.name }
|
|
|
|
|
return { id: msg.wamid, text: autoLinkText(templateDataMapped?.body?.text || templateDataMapped?.body?.parameters?.[0]?.text || ''), title: msg.template.name }
|
|
|
|
|
},
|
|
|
|
|
renderForReply: (msg) => {
|
|
|
|
|
const templateDataMapped = msg.template?.components ? msg.template.components.reduce((r, v) => ({ ...r, [v.type]: v }), {}) : null;
|
|
|
|
|