Browse Source

chore:update

wxyyxc1992 4 years ago
parent
commit
415e191e2b

+ 2
- 1
packages/cts-api/src/WebSocketClient.ts View File

@@ -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 View File


+ 14
- 0
packages/cts-api/src/protocol/AttachmentMsg.ts View File

@@ -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 View File


+ 0
- 1
packages/cts-api/src/types.d.ts View File

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