|
|
|
@ -170,7 +170,7 @@ const setupMessageHandler = () => {
|
|
|
|
|
upsertFields.evt_id = webhookBody.id;
|
|
|
|
|
const pusher = { customerProfile_id: waiMessage.customerProfile?.id || '', customerProfile_name: waiMessage.customerProfile?.name || '' };
|
|
|
|
|
const record = objectMapper(waiMessage, { from: 'from', to: 'to', status: 'msg_status', type: 'msgtype' }, false);
|
|
|
|
|
const waiContentFieldsToDB = waiContentToDB(messageData);
|
|
|
|
|
const waiContentFieldsToDB = messageData.type ? waiContentToDB(messageData) : {};
|
|
|
|
|
if (['image', 'sticker', 'audio', 'video', 'document'].includes(waiMessage.type)) {
|
|
|
|
|
// 存储文件
|
|
|
|
|
const filePath = messageData[messageData.type].filePath;
|
|
|
|
|