wxyyxc1992 před 5 roky
rodič
revize
415e191e2b

+ 2
- 1
packages/cts-api/src/WebSocketClient.ts Zobrazit soubor

@@ -1,5 +1,6 @@
1
-import { ContactMsg, ContactAddMsg, ChatroomMsg } from './messages';
2 1
 import { Client } from 'ts-linker-sdk';
2
+
3
+import { ContactMsg, ContactAddMsg, ChatroomMsg } from './messages';
3 4
 import { getMetaData } from './meta';
4 5
 
5 6
 export interface WebSocketClientStatus {

+ 0
- 0
packages/cts-api/src/api/index.ts Zobrazit soubor


+ 14
- 0
packages/cts-api/src/protocol/AttachmentMsg.ts Zobrazit soubor

@@ -0,0 +1,14 @@
1
+import { MsgBase, MsgType } from './MsgBase';
2
+
3
+export class AttachmentMsg extends MsgBase {
4
+  type: MsgType = 'attachment';
5
+
6
+  // 消息内容
7
+  msg: string;
8
+
9
+  static createMsg(baseMsg: Partial<AttachmentMsg>): AttachmentMsg {
10
+    const msg = new AttachmentMsg();
11
+    Object.assign(msg, baseMsg);
12
+    return msg;
13
+  }
14
+}

+ 0
- 0
packages/cts-api/src/protocol/index.ts Zobrazit soubor


+ 0
- 1
packages/cts-api/src/types.d.ts Zobrazit soubor

@@ -1 +0,0 @@
1
-declare module 'ts-linker-sdk/dist/index.umd';