Commit 2e163305 by zhousil

Merge branch 'master' into pre

parents 92ac192a fe6ab1be
Showing with 6 additions and 6 deletions
......@@ -15,7 +15,7 @@ import { getChatModelInfo } from "../utils/chat-info";
import { ChatUserInfoService } from "../utils/user-info";
import Chat from "../xim";
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 { ChatStatus, ChatStore, ChatStoreState } from "./model";
......@@ -32,7 +32,7 @@ function uniqueMessages(
messages: NonNullable<ChatStore.STATE_CHAT_MSG_HISTORY>
) {
const arr = [...messages];
return unique(arr, function (item, all) {
return unique(arr, function(item, all) {
return all.findIndex((k) => k.id === item.id);
});
}
......@@ -366,7 +366,7 @@ export default {
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 } = {};
return (
state: ChatStoreState,
......@@ -862,7 +862,7 @@ export default {
await getChatModelInfo(
wantedChatRoom.model_name,
wantedChatRoom.obj_id,
wantedChatRoom.detail_name
Chat.isBackend() ? wantedChatRoom.detail_name : ''
)
.then((info) => {
commit(
......@@ -940,7 +940,7 @@ export default {
}
commit(
ChatStore.MUTATION_SAVE_CURRENT_CHAT_MEMBERS,
unique(newChatMembers, function (item, all) {
unique(newChatMembers, function(item, all) {
return all.findIndex((k) => k.eid === item.eid);
})
);
......@@ -966,7 +966,7 @@ export default {
await getChatModelInfo(
firstChat.model_name,
firstChat.obj_id,
firstChat.detail_name
Chat.isBackend() ? firstChat.detail_name : ''
);
await dispatch(
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