Commit fe6ab1be by Sixong.Zhu

update

parent e1a7be9b
Showing with 6 additions and 6 deletions
...@@ -15,7 +15,7 @@ import { getChatModelInfo } from "../utils/chat-info"; ...@@ -15,7 +15,7 @@ import { getChatModelInfo } from "../utils/chat-info";
import { ChatUserInfoService } from "../utils/user-info"; import { ChatUserInfoService } from "../utils/user-info";
import Chat from "../xim"; import Chat from "../xim";
import { Chat as ChatType, Message } from "../xim/models/chat"; import { Chat as ChatType, Message } from "../xim/models/chat";
import xim, { ChatNotifyListener, Xim } from "../xim/xim"; import xim, { ChatNotifyListener } from "../xim/xim";
import { decodeJwt } from "uniplat-sdk"; import { decodeJwt } from "uniplat-sdk";
import { ChatStatus, ChatStore, ChatStoreState } from "./model"; import { ChatStatus, ChatStore, ChatStoreState } from "./model";
...@@ -32,7 +32,7 @@ function uniqueMessages( ...@@ -32,7 +32,7 @@ function uniqueMessages(
messages: NonNullable<ChatStore.STATE_CHAT_MSG_HISTORY> messages: NonNullable<ChatStore.STATE_CHAT_MSG_HISTORY>
) { ) {
const arr = [...messages]; const arr = [...messages];
return unique(arr, function (item, all) { return unique(arr, function(item, all) {
return all.findIndex((k) => k.id === item.id); return all.findIndex((k) => k.id === item.id);
}); });
} }
...@@ -366,7 +366,7 @@ export default { ...@@ -366,7 +366,7 @@ export default {
state[ChatStore.STATE_CHAT_SENDING_MESSAGES] = [...current]; state[ChatStore.STATE_CHAT_SENDING_MESSAGES] = [...current];
} }
}, },
[ChatStore.MUTATION_SAVE_CURRENT_CHAT_INPUTING]: (function () { [ChatStore.MUTATION_SAVE_CURRENT_CHAT_INPUTING]: (function() {
const setTimeoutId: { [key: string]: number } = {}; const setTimeoutId: { [key: string]: number } = {};
return ( return (
state: ChatStoreState, state: ChatStoreState,
...@@ -862,7 +862,7 @@ export default { ...@@ -862,7 +862,7 @@ export default {
await getChatModelInfo( await getChatModelInfo(
wantedChatRoom.model_name, wantedChatRoom.model_name,
wantedChatRoom.obj_id, wantedChatRoom.obj_id,
wantedChatRoom.detail_name Chat.isBackend() ? wantedChatRoom.detail_name : ''
) )
.then((info) => { .then((info) => {
commit( commit(
...@@ -940,7 +940,7 @@ export default { ...@@ -940,7 +940,7 @@ export default {
} }
commit( commit(
ChatStore.MUTATION_SAVE_CURRENT_CHAT_MEMBERS, ChatStore.MUTATION_SAVE_CURRENT_CHAT_MEMBERS,
unique(newChatMembers, function (item, all) { unique(newChatMembers, function(item, all) {
return all.findIndex((k) => k.eid === item.eid); return all.findIndex((k) => k.eid === item.eid);
}) })
); );
...@@ -966,7 +966,7 @@ export default { ...@@ -966,7 +966,7 @@ export default {
await getChatModelInfo( await getChatModelInfo(
firstChat.model_name, firstChat.model_name,
firstChat.obj_id, firstChat.obj_id,
firstChat.detail_name Chat.isBackend() ? firstChat.detail_name : ''
); );
await dispatch( await dispatch(
ChatStore.ACTION_SAVE_CURRENT_CHAT_ID_VERSION, ChatStore.ACTION_SAVE_CURRENT_CHAT_ID_VERSION,
......
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