确认gchatmanager正常、connect连接正常
发送消息之后,收到onPrepare回调,但是隔一段时间会收到onfail回调,错误码为-1
发送消息代码如下:
public fun sendNote(toUserId: String, content: String, callback: SendMessageCallback){
var message = Message()
var messageContent = TextMessageContent(content)
message.content = messageContent
message.direction = MessageDirection.Send
message.toUsers = arrayOf(toUserId)
message.sender = GlobalWildfire?.gChatManager?.userId
var conversation: Conversation = Conversation(Conversation.ConversationType.Single,toUserId )
message.conversation = conversation
GlobalWildfire.gChatManager?.sendMessage(message, callback)
}