瀏覽代碼

add more type

Paul 4 年之前
父節點
當前提交
e80601c548
共有 2 個檔案被更改,包括 2 行新增2 行删除
  1. 1
    1
      packages/cts-api/src/protocol/MediaMsg.ts
  2. 1
    1
      packages/cts-api/src/protocol/MsgBase.ts

+ 1
- 1
packages/cts-api/src/protocol/MediaMsg.ts 查看文件

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

+ 1
- 1
packages/cts-api/src/protocol/MsgBase.ts 查看文件

@@ -1,6 +1,6 @@
1 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 5
 export type ChatType = 'chat' | 'room' | 'group' | 'push';
6 6