No Description

messages.ts 608B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /** 对于消息类型的定义 */
  2. export interface ContactMsg {
  3. fid: string;
  4. }
  5. export interface ContactAddMsg {
  6. id: string;
  7. to: string;
  8. }
  9. export interface ChatroomMsg {
  10. room_id: string;
  11. // 管理与编号
  12. admin_id?: string;
  13. // 管理与列表
  14. admins_id?: string[];
  15. // 成员 ID
  16. member: string;
  17. authority?: number;
  18. }
  19. export interface ChatMsg {
  20. from: string;
  21. type: 'room';
  22. to: string;
  23. msg: {
  24. type: 'cmd' | 'text' | 'image';
  25. command?: string;
  26. action?: string;
  27. message?: string;
  28. msg_id?: string;
  29. };
  30. msg_id?: string;
  31. ext?: Record<string, string>;
  32. }