Commit 63a6d340 by Sixong.Zhu

u

parent d7ef878e
Showing with 5 additions and 5 deletions
...@@ -9,7 +9,6 @@ import { getChatModelInfo } from "../utils/chat-info"; ...@@ -9,7 +9,6 @@ import { getChatModelInfo } from "../utils/chat-info";
import { decode } from "../utils/jwt"; import { decode } from "../utils/jwt";
import { getUserInfo } from "../utils/user-info"; import { getUserInfo } from "../utils/user-info";
import Chat from "../xim"; import Chat from "../xim";
import chatType from "../xim/chat-type";
import { Chat as ChatType, Message } from "../xim/models/chat"; import { Chat as ChatType, Message } from "../xim/models/chat";
import xim, { ChatNotifyListener } from "../xim/xim"; import xim, { ChatNotifyListener } from "../xim/xim";
...@@ -86,6 +85,8 @@ function buildChatItem(chat: RawChatItem) { ...@@ -86,6 +85,8 @@ function buildChatItem(chat: RawChatItem) {
return { ...chat, chat_id: chat.id } as ChatType; return { ...chat, chat_id: chat.id } as ChatType;
} }
const chatType = "group";
const filterActiveChats = (items: RawChatItem[]) => { const filterActiveChats = (items: RawChatItem[]) => {
return items.filter( return items.filter(
(i) => (i) =>
...@@ -93,7 +94,7 @@ const filterActiveChats = (items: RawChatItem[]) => { ...@@ -93,7 +94,7 @@ const filterActiveChats = (items: RawChatItem[]) => {
!i.is_exited && !i.is_exited &&
!i.is_remove && !i.is_remove &&
!i.is_deleted && !i.is_deleted &&
i.type === "group" i.type === chatType
); );
}; };
......
export default "group";
import Vue from "vue"; import Vue from "vue";
import { wampDebug, XChatClient } from "xchat-client"; import { wampDebug, XChatClient } from "xchat-client";
import chatType from "../xim/chat-type";
import { TokenStringGetter } from "./../model"; import { TokenStringGetter } from "./../model";
import { ChatLoggerService } from "./logger"; import { ChatLoggerService } from "./logger";
import { Message, NotifyMessage } from "./models/chat"; import { Message, NotifyMessage } from "./models/chat";
...@@ -34,6 +32,8 @@ export enum Kind { ...@@ -34,6 +32,8 @@ export enum Kind {
UserNotify = "user_notify", UserNotify = "user_notify",
} }
const chatType = "group";
export class Xim { export class Xim {
private eventBus = new Vue(); private eventBus = new Vue();
......
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