Commit 4d41bad9 by panjiangyi

添加删除成员

parent b469c5a8
Showing with 4 additions and 3 deletions
...@@ -19,6 +19,7 @@ export const ns = ChatStore.ns; ...@@ -19,6 +19,7 @@ export const ns = ChatStore.ns;
const sdk = Chat.getSdk; const sdk = Chat.getSdk;
const UniplatChatModelName = "UniplatChat"; const UniplatChatModelName = "UniplatChat";
const model = () => sdk().model(UniplatChatModelName); const model = () => sdk().model(UniplatChatModelName);
const orgId = () => Chat.getOrgId() as string;
function uniqueMessages( function uniqueMessages(
messages: NonNullable<ChatStore.STATE_CHAT_MSG_HISTORY> messages: NonNullable<ChatStore.STATE_CHAT_MSG_HISTORY>
...@@ -400,7 +401,7 @@ export default { ...@@ -400,7 +401,7 @@ export default {
) { ) {
const { id, ImChatId, uniplat_version } = await sdk() const { id, ImChatId, uniplat_version } = await sdk()
.model(params.modelName) .model(params.modelName)
.chat(+params.selectedListId) .chat(+params.selectedListId, orgId())
.createChat(); .createChat();
const uniplatId = id.value; const uniplatId = id.value;
const chatId = ImChatId.value; const chatId = ImChatId.value;
...@@ -566,7 +567,7 @@ export default { ...@@ -566,7 +567,7 @@ export default {
if (obj_id == null) return; if (obj_id == null) return;
await sdk() await sdk()
.model(model_name) .model(model_name)
.chat(obj_id) .chat(obj_id, orgId())
.addMember(uids.map((id) => Number(id))); .addMember(uids.map((id) => Number(id)));
await new Promise((resolve) => setTimeout(resolve, 500)); await new Promise((resolve) => setTimeout(resolve, 500));
await dispatch(ChatStore.ACTION_GET_CHAT_MEMBERS); await dispatch(ChatStore.ACTION_GET_CHAT_MEMBERS);
...@@ -582,7 +583,7 @@ export default { ...@@ -582,7 +583,7 @@ export default {
if (obj_id == null) return; if (obj_id == null) return;
await sdk() await sdk()
.model(model_name) .model(model_name)
.chat(obj_id) .chat(obj_id, orgId())
.removeMember(uids.map((id) => Number(id))); .removeMember(uids.map((id) => Number(id)));
await new Promise((resolve) => setTimeout(resolve, 500)); await new Promise((resolve) => setTimeout(resolve, 500));
await dispatch(ChatStore.ACTION_GET_CHAT_MEMBERS); await dispatch(ChatStore.ACTION_GET_CHAT_MEMBERS);
......
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