|
|
|
|
@ -594,6 +594,10 @@ export const whatsappMsgTypeMapped = {
|
|
|
|
|
data: (msg) => ({ id: msg.wamid, text: `[暂不支持此消息类型](${msg.wamid})`, dateString: `${dayjs(msg.sendTime).format('MM-DD HH:mm')} [ WhatsApp未提供消息内容 ] 可能是客人删除消息/会话, \n可询问客人截图/详细内容 或 忽略 📌` }),
|
|
|
|
|
renderForReply: (msg) => ({ id: msg?.wamid || msg.id, text: `[Message type unsupported](${msg.wamid})` }),
|
|
|
|
|
},
|
|
|
|
|
unresolvable: {
|
|
|
|
|
type: 'text',
|
|
|
|
|
data: (msg) => ({ id: msg.wamid, text: `[无法解析](${msg.wamid})`, }),
|
|
|
|
|
},
|
|
|
|
|
reaction: {
|
|
|
|
|
type: 'text',
|
|
|
|
|
data: (msg) => ({ id: msg.wamid, text: msg.reaction?.emoji || '' }),
|
|
|
|
|
@ -745,7 +749,7 @@ export const parseRenderMessageList = (messages) => {
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
const msgContent = typeof msgtext === 'string' ? JSON.parse(msgContentString) : (msgtext || {});
|
|
|
|
|
const msgType = isEmpty(msgContent) ? msg.msgtype : (Object.keys(whatsappMsgTypeMapped).includes(msgContent.type) ? msgContent.type : 'unsupported')
|
|
|
|
|
const msgType = isEmpty(msgContent) ? msg.msgtype : (Object.keys(whatsappMsgTypeMapped).includes(msgContent.type) ? msgContent.type : 'unresolvable')
|
|
|
|
|
msgContent.template = msg.msgtype === 'template' ? { ...msgContent.template, ...template } : {};
|
|
|
|
|
// const parseMethod = msgContent.bizType === 'whatsapp' ? cloneDeep(whatsappMsgTypeMapped) : {};
|
|
|
|
|
let waCode, waError = '';
|
|
|
|
|
|