1–关于会话 (conversation)
官方定义是:操作聊天消息EMMessage的容器,在SDK中对应的类型是EMConversation。
//生成message
EMMessage * message = [[EMMessage alloc]initWithConversationID:@"5000" from:form to:@"test2" body:body ext:nil];
之前我测试了一下,不管是单聊还是群聊,上面方法中的to后面的id只要写对了,对方就能收到消息,所以一直觉得这个conversationId有点鸡肋,个人认为应该是为了便于查看聊天记录等信息,同时更加方便管理,所以使用了这个会话conversationId。
2—-关于消息的发送to后面的id填什么
单聊时:即是对方的id
组聊和聊天室:是群groupid或者聊天室id