成功创建群组QBChatDialog后,我尝试通过
向所有占用者发送邀请消息if self.chatDialog.join() == true {
for occupantID in self.chatDialog.occupantIDs {
var inviteMessage = self.createChatNotificationForGroupChatCreation(self.chatDialog)
var timestamp = NSDate().timeIntervalSince1970
inviteMessage.customParameters["date_sent"] = timestamp
// send notification
//
inviteMessage.recipientID = occupantID as! UInt
//QBChat.instance().sendMessage(inviteMessage)
//QBChatDialog. sendMessage(inviteMessage)
if self.chatDialog.sendMessage(inviteMessage) == true {
println("################# Send ok ######################")
} else {
println("!!!!!!!!!!!!!!!! error sending !!!!!!!!!!!!!!!!!!")
}
}
}
但我总是得到错误。它一直告诉我“房间没有加入”。我确实使用“self.chatDialog.join()”命令加入了房间。在发送消息之前,我甚至检查过程是否正常。请帮忙。