Quickblox Android: Total unread messages count request

天大地大妈咪最大 提交于 2019-12-13 07:01:27

问题


I have seen that in the iOS sdk and the API I can get the total unread messages count, but I couldn't find a way to do the same with the Quickblox Android SDK. Is there a way to achieve this?

I need something similar to this but for Android instead of iOS:

let dialogsIDs: NSSet = NSSet(array: ["55fae39ca28f9a701d0058fb"])
QBRequest.totalUnreadMessageCountForDialogsWithIDs(dialogsIDs as! Set<String>, successBlock: { (response: QBResponse, count: UInt, dialogs: [String : AnyObject]?) -> Void in

}) { (response: QBResponse) -> Void in

}

回答1:


I opened an issue with this in the quickblox github repo and they have already included it in the next release. It is already available in the last snapshot.




回答2:


When you fetch chat dialogs there is a key inside each dialog 'unreadMessageCount' which is responsible for providing unread count.



来源:https://stackoverflow.com/questions/36569272/quickblox-android-total-unread-messages-count-request

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!