public void JoinConversation(string id) { conversation = AVIMConversation.CreateWithoutData(id, imClient); imClient.JoinAsync(conversation); } public void LeaveConversation(string id) { imClient.LeaveAsync(conversation); }
现在遇到的问题是:用LeaveConversation方法离开后再也不能返回会话了,也不能再向Leancloud后台发送消息了,是我JoinConversation方法写的不对吗,求大神解析,谢谢!
补充:有个错误消息,我对话的id一直没变过websocket<={"reason":"CONVERSATION_NOT_FOUND","code":4303,"cmd":"error","appId":"HBQSdpGKVHybWpOkBR1IdYCV-gzGzoHsz","peerId":"1001","i":-65531,"service":2}
websocket<={"reason":"CONVERSATION_NOT_FOUND","code":4303,"cmd":"error","appId":"HBQSdpGKVHybWpOkBR1IdYCV-gzGzoHsz","peerId":"1001","i":-65531,"service":2}
LeaveAsync 成功了然后 再调用 JoinAsync 就再也会回不去了?这不太科学。
根据错误显示,是对话 ID 不存在,要不你打印一下 websocket => 这种日志,也就是客户端发出去的请求的内容,看看 id 是多少。