fix: 创建会话

2.0/email-builder
Lei OT 11 months ago
parent 1b7e4ff0ac
commit 8eab29e879

@ -49,7 +49,7 @@ export function useConversationNewItem() {
guest_phone: body.phone_number || '',
guest_name: body.name || '',
}
const createdNew = await postNewOrEditConversationItem({ ...newChat, opi_sn: opisn || userId, conversationid });
const createdNew = await postNewOrEditConversationItem({ ...newChat, opisn: opisn || userId, conversationid });
// addToConversationList([{...createdNew, sn: createdNew.conversationid}]);
const _list = await fetchConversationsList({ opisn });
addToConversationList(_list);

@ -125,7 +125,8 @@ export const ConversationItemFormModal = ({ open, onCreate, onCancel, initialVal
// formInstance?.resetFields();
setNewItemLoading(true);
if (initialValues.is_current_order !== true) newConversation({...values, conversationid: _initialValues?.sn || '', opi_sn: userId});
// if (initialValues.is_current_order !== true)
newConversation({...values, conversationid: _initialValues?.sn || '', opi_sn: userId});
if (typeof onCreate === 'function') {
onCreate(values);
}

Loading…
Cancel
Save