diff --git a/src/actions/ConversationActions.js b/src/actions/ConversationActions.js index fe5295d..0905970 100644 --- a/src/actions/ConversationActions.js +++ b/src/actions/ConversationActions.js @@ -87,6 +87,7 @@ export const fetchConversationsSearch = async (params) => { ...ele, customer_name: `${ele.whatsapp_name || ''}`.trim(), whatsapp_name: `${ele.whatsapp_name || ''}`.trim(), + opi_sn: ele.OPI_SN || ele.opi_sn || 0, OPI_Name: `${ele.OPI_Name || ''}`.trim(), matchMsgList: parseRenderMessageList((ele.msglist_AsJOSN || [])), // .reverse()), })); diff --git a/src/views/ChatHistory.jsx b/src/views/ChatHistory.jsx index 3b9cbbd..a93a612 100644 --- a/src/views/ChatHistory.jsx +++ b/src/views/ChatHistory.jsx @@ -150,10 +150,10 @@ function ChatHistory() { setChatItemMessages([]); setParamsForMsgList({}); setSelectedMatch({}); - if (isEmpty(selectedConversation.conversationid)) { + if (isEmpty(selectedConversation.conversationid) || isEmpty(selectedConversation.opi_sn)) { return () => {}; } - const firstActionPageParams = { opisn: selectedConversation.OPI_SN, whatsappid: selectedConversation.whatsapp_phone_number }; + const firstActionPageParams = { opisn: selectedConversation.opi_sn, whatsappid: selectedConversation.whatsapp_phone_number }; if (isEmpty(selectedConversation.matchMsgList)) { firstActionPageParams.loadPrePage = false; firstActionPageParams.loadNextPage = true;