|
|
|
@ -36,6 +36,7 @@ export function useConversationNewItem() {
|
|
|
|
|
state.setCurrentConversation,
|
|
|
|
|
state.updateConversationItem,
|
|
|
|
|
]);
|
|
|
|
|
const updateCurrentConversation = useConversationStore((state) => state.updateCurrentConversation);
|
|
|
|
|
const conversationsList = useConversationStore((state) => state.conversationsList);
|
|
|
|
|
const addToConversationList = useConversationStore((state) => state.addToConversationList);
|
|
|
|
|
const userId = useAuthStore((state) => state.loginUser.userId);
|
|
|
|
@ -93,7 +94,7 @@ export function useConversationNewItem() {
|
|
|
|
|
phone_number: createdNew.guest_phone,
|
|
|
|
|
whatsapp_phone_number: createdNew.whatsapp_phone_number,
|
|
|
|
|
},
|
|
|
|
|
conversation_memo: createdNew.remark,
|
|
|
|
|
conversation_memo: createdNew.guest_name || createdNew.remark,
|
|
|
|
|
// lasttime: createdNew.session_creatime,
|
|
|
|
|
show_default: createdNew.remark || createdNew.guest_name || createdNew.guest_phone || createdNew.guest_email || createdNew.whatsapp_phone_number || '',
|
|
|
|
|
}
|
|
|
|
@ -117,7 +118,11 @@ export function useConversationNewItem() {
|
|
|
|
|
// })
|
|
|
|
|
return ;
|
|
|
|
|
}
|
|
|
|
|
updateConversationItem(buildChatItem);
|
|
|
|
|
if (currentConversation.sn === createdNew.conversationid) {
|
|
|
|
|
updateCurrentConversation(buildChatItem);
|
|
|
|
|
} else {
|
|
|
|
|
updateConversationItem(buildChatItem);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|