Commit 383d54c9 by 吴云建

添加客户端发起会话

parent be0ef3af
Showing with 21 additions and 0 deletions
......@@ -433,6 +433,20 @@ export default {
commit(ChatStore.MUTATION_SHOW_CHAT, true);
await dispatch(ChatStore.ACTION_SAVE_CURRENT_CHAT_ID_VERSION, chatId);
},
async [ChatStore.ACTION_CREATE_NEW_CHAT_BY_CLIENT](
{ commit, dispatch },
params: Parameters<ChatStore.ACTION_CREATE_NEW_CHAT_BY_CLIENT>[0]
) {
const { id, ImChatId, uniplat_version } = await sdk()
.model(params.modelName)
.chat(+params.selectedListId, orgId())
.createChat();
const uniplatId = id.value;
const chatId = Number(ImChatId.value);
const v = uniplat_version.value;
commit(ChatStore.MUTATION_SHOW_CHAT, true);
await dispatch(ChatStore.ACTION_SAVE_CURRENT_CHAT_ID_VERSION, chatId);
},
// async [ChatStore.ACTION_CREATE_NEW_CHAT_BY_CLIENT_SIDE](
// { commit, dispatch },
// option: {
......
......@@ -239,6 +239,13 @@ export namespace ChatStore {
uids: string[];
}) => Promise<void>
export const ACTION_CREATE_NEW_CHAT_BY_CLIENT = "顾客向客服发起新会话";
export type ACTION_CREATE_NEW_CHAT_BY_CLIENT = (params: {
modelName: string;
selectedListId: string;
uids: string[];
}) => Promise<void>
export const ACTION_CREATE_NEW_CHAT_BY_CLIENT_SIDE =
"startNewConversationByCustomerSide";
export type ACTION_CREATE_NEW_CHAT_BY_CLIENT_SIDE = (option: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment