export const MSG_TYPE = {
  TEXT: 1, // 文本
  FILE: 2, // 文件
  IMAGE: 3, // 图片
  AUDIO: 4, // 音频
  VIDEO: 5, // 视频
  AUDIO_ONLINE: 6, // 音频
  VIDEO_ONLINE: 7, // 视频
  NOTICE:99,//通知
};
export const MSG_TYPE_MAP = [
  MSG_TYPE.TEXT,
  MSG_TYPE.FILE,
  MSG_TYPE.IMAGE,
  MSG_TYPE.AUDIO,
  MSG_TYPE.VIDEO,
  MSG_TYPE.AUDIO_ONLINE,
  MSG_TYPE.VIDEO_ONLINE,
  MSG_TYPE.NOTICE
]

export const MESSAGE_TYPE_USER = 1; // 单聊
export const MESSAGE_TYPE_GROUP = 2; // 群聊

export const MESSAGE_HEAT_BEAT = 'heatbeat'; // 心跳包
 
export const MESSAGE_TRANS_TYPE = "webrtc";

export const MESSAGE_REVOKE = 101; // 个人撤回消息
export const MESSAGE_RECEIPT = 102; // 发送消息回执


// 好友
export const MESSAGE_APPLY_FRIEND = 111; //申请好友
export const MESSAGE_PASS_FRIEND = 112;  //同意
export const MESSAGE_REJECT_FRIEND = 113;  //拒绝
export const MESSAGE_DELETE_FRIEND = 114;  //删除

// 群
export const JION_GROUP = 211;  //加入群
export const EXIT_GROUP = 212;  //退出群
export const REMOVE_GROUP = 213;  //移出群
export const DELETE_GROUP = 214;  //解散群
export const CREATE_GROUP = 215;  //创建群
export const INVITATION_GROUP = 216;  //邀请群
export const MESSAGE_CC_GROUP = 217; // 群@功能
export const MESSAGE_NOTICE_GROUP = 218; // 群公告
export const MESSAGE_REVOKE_GROUP = 219; // 群消息撤回
export const MESSAGE_STICKY_GROUP = 220; // 群消息置顶
export const MESSAGE_NICKNAME_GROUP = 221; // 群个人昵称修改

// 系统消息回执
export const MESSAGE_SYSTEM_RECEIPT = 999;

// 发送的系统消息
export const MSG_SYSTEM_GROUP = [
  MESSAGE_APPLY_FRIEND,
  MESSAGE_PASS_FRIEND,
  MESSAGE_REJECT_FRIEND,
  MESSAGE_DELETE_FRIEND,
  JION_GROUP,
  EXIT_GROUP,
  REMOVE_GROUP,
  DELETE_GROUP,
  CREATE_GROUP,
  INVITATION_GROUP,
  MESSAGE_NOTICE_GROUP,
  MESSAGE_NICKNAME_GROUP,
  MESSAGE_SYSTEM_RECEIPT,
]

// 好友系统消息批量处理
export const MSG_TYPE_FRIEND = [
  MESSAGE_APPLY_FRIEND,
  MESSAGE_PASS_FRIEND,
  MESSAGE_REJECT_FRIEND,
  MESSAGE_DELETE_FRIEND,
]

// 群系统消息批量处理
export const MSG_TYPE_GROUP = [
  INVITATION_GROUP,
  JION_GROUP,
  REMOVE_GROUP,
  EXIT_GROUP,
  DELETE_GROUP,
  CREATE_GROUP,
  MESSAGE_CC_GROUP,
  MESSAGE_NOTICE_GROUP,
  MESSAGE_STICKY_GROUP,
  MESSAGE_NICKNAME_GROUP
]