gpt4 book ai didi

objective-c - 未读消息总数 quickblox

转载 作者:搜寻专家 更新时间:2023-10-30 20:27:55 24 4
gpt4 key购买 nike

你好如何获取quicblox中的未读消息总数?对于所有对话框。有没有直接的api调用?谢谢!

最佳答案

这是从 quickblox (Swift) 获取未读消息总数的工作代码

let dialogsIDs: NSSet = NSSet(array: [])

QBRequest.totalUnreadMessageCountForDialogs(withIDs: dialogsIDs as! Set<String>, successBlock: { (response, count, dialogs) in

print(count) // Your unread-message count is here.

}) { (response) in
print(response.error as Any)
}

If you want to fetch the unread count for particular dialogID then simply pass the dialogsIDs in array like this :

let dialogsIDs: NSSet = NSSet(array: ["5c500568a0eb470421271794","5c523447a28f9a3ac1f2c1ca"])

关于objective-c - 未读消息总数 quickblox,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31363593/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com