From efd60d19c2a3706d76582d7c6207ec2253fcacf8 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Wed, 20 Mar 2024 11:53:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=A2=E5=8D=95=E4=BF=AE=E6=94=B9what?= =?UTF-8?q?sappID=E4=B9=8B=E5=90=8E,=20=E8=8E=B7=E5=8F=96=E6=96=B0?= =?UTF-8?q?=E4=BC=9A=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: 历史记录: 转发的消息. 不以引用显示 style: 模板 free style --- src/lib/msgUtils.js | 3 ++- src/views/Conversations/Components/ConversationsList.jsx | 4 +++- src/views/Conversations/Components/Input/Template.jsx | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/msgUtils.js b/src/lib/msgUtils.js index 2718924..e82cf39 100644 --- a/src/lib/msgUtils.js +++ b/src/lib/msgUtils.js @@ -494,7 +494,8 @@ export const parseRenderMessageList = (messages, conversationid = null) => { statusTitle: msgStatusRenderMappedCN[msgContent?.status || 'failed'], } : {}), - ...((isEmpty(msg.messageorigin_AsJOSN) && isEmpty(msgContent.context)) + ...((isEmpty(msg.messageorigin_AsJOSN) && (isEmpty(msgContent.context) || msgContent.context?.forwarded === true)) + // ...((isEmpty(msg.context) && isEmpty(msg.reaction)) || msg.context?.forwarded === true || isEmpty(msg.messageorigin) // ...((isEmpty(msg.messageorigin_AsJOSN) || isEmpty(msgContent.context)) ? {} : { diff --git a/src/views/Conversations/Components/ConversationsList.jsx b/src/views/Conversations/Components/ConversationsList.jsx index 408ea47..f1fed1b 100644 --- a/src/views/Conversations/Components/ConversationsList.jsx +++ b/src/views/Conversations/Components/ConversationsList.jsx @@ -55,7 +55,9 @@ const Conversations = ({ mobile }) => { const getOrderConversationList = async (colisn) => { const { whatsapp_phone_number } = switchToC; const whatsappID = coli_guest_WhatsApp || whatsapp_phone_number || ''; - let findCurrentOrderChats = conversationsList.filter((item) => `${item.coli_sn}` === `${colisn}`); + // let findCurrentOrderChats = conversationsList.filter((item) => `${item.coli_sn}` === `${colisn}`); + // 使用opisn + whatsappID 判断, 解决订单修改whatsappID号码之后获取新会话, 登录账号此处省略 + let findCurrentOrderChats = conversationsList.filter((item) => `${item.whatsapp_phone_number}` === `${whatsappID}`); let findCurrentIndex = isEmpty(findCurrentOrderChats) ? -1 : 0; // findCurrentOrderChats.length-1; let findCurrent = findCurrentOrderChats[findCurrentIndex]; if (findCurrentIndex !== -1) { diff --git a/src/views/Conversations/Components/Input/Template.jsx b/src/views/Conversations/Components/Input/Template.jsx index 18fc013..cf330a0 100644 --- a/src/views/Conversations/Components/Input/Template.jsx +++ b/src/views/Conversations/Components/Input/Template.jsx @@ -111,7 +111,7 @@ const InputTemplate = ({ mobile, disabled = false, invokeSendMessage }) => { onChange={(e) => { onInput(tempItem, ele.key, e.target.value, paramsVal); }} - className='w-auto max-w-24' + className={`w-auto ${paramsVal[ele.key] ? 'max-w-24' : 'max-w-60'}`} size={'small'} title={ele.key} placeholder={paramsVal[ele.key] || ele.key}