Browse Source

add more type

Paul 4 years ago
parent
commit
e80601c548

+ 1
- 1
packages/cts-api/src/protocol/MediaMsg.ts View File

1
 import { MsgBase, MsgType } from './MsgBase';
1
 import { MsgBase, MsgType } from './MsgBase';
2
 
2
 
3
 export class MediaMsg extends MsgBase {
3
 export class MediaMsg extends MsgBase {
4
-  type: MsgType = 'media';
4
+  msgType: MsgType = 'audio';
5
 
5
 
6
   // 消息内容
6
   // 消息内容
7
   file: { data: Blob | null; url: string };
7
   file: { data: Blob | null; url: string };

+ 1
- 1
packages/cts-api/src/protocol/MsgBase.ts View File

1
 import { uuid } from '../utils/uuid';
1
 import { uuid } from '../utils/uuid';
2
 
2
 
3
-export type MsgType = 'text' | 'media' | 'cmd' | 'attachment';
3
+export type MsgType = 'text' | 'audio' | 'video' | 'cmd' | 'attachment';
4
 
4
 
5
 export type ChatType = 'chat' | 'room' | 'group' | 'push';
5
 export type ChatType = 'chat' | 'room' | 'group' | 'push';
6
 
6