From 83f05f90e7d96ca540aa9e8abe47831ab3c505a7 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Mon, 30 Dec 2024 16:41:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/channel/bubbleMsgUtils.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/channel/bubbleMsgUtils.js b/src/channel/bubbleMsgUtils.js index b8bf8b3..5182575 100644 --- a/src/channel/bubbleMsgUtils.js +++ b/src/channel/bubbleMsgUtils.js @@ -812,15 +812,18 @@ export const parseRenderMessageList = (messages) => { // conversationid: conversationid, // title: msg.customerProfile.name, // whatsapp_msg_type: (msg.msg_source || 'WABA') === 'WABA' ? msgContent.type : '', // 1.0接口没有msg_source + whatsapp_msg_type: '', + waba: '', + wabaName: '', ...((msg.msg_source) === 'WABA' ? { whatsapp_msg_type: msgContent.type, waba: msg.msg_direction === 'outbound' ? msgContent.from : msgContent.to, wabaName: WABAccountsMapped[msg.msg_direction === 'outbound' ? msgContent.from : msgContent.to]?.verifiedName, - } : { - whatsapp_msg_type: '', - waba: '', - wabaName: '', - }), + } : {}), + ...((msg.msg_source) === 'wai' ? { + whatsapp_msg_type: msgContent.type, + wabaName: '个人号', + } : {}), } }); };