toChatType function
聊天类型 ChatType 类型数据转 int
Implementation
toChatType(ChatType type){
if(type == ChatType.Chat){
return 0;
}else if(type == ChatType.GroupChat){
return 1;
}else if(type == ChatType.ChatRoom){
return 2;
}
}