OGeek|极客世界-中国程序员成长平台

标题: ios - 在 iOS XMPP 聊天应用程序中读取回执 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 10:39
标题: ios - 在 iOS XMPP 聊天应用程序中读取回执

我想实现“阅读消息功能”,如 Facebook、iMessage、WhatsApp 等。 如果接收者已阅读该消息,则发送者将收到另一人已阅读该消息的通知。

xMPP 中是否有任何协议(protocol)可用于此功能?

如果发件人发送了消息,并且如果它成功传递,则有一个 xmpp 协议(protocol)。从链接中得到它: How to get the message delivary status using XMPP framework

以下是获取交货报告的代码。

XMPPMessageDeliveryReceipts* xmppMessageDeliveryRecipts = [[XMPPMessageDeliveryReceipts alloc] initWithDispatchQueue:dispatch_get_main_queue()];
xmppMessageDeliveryRecipts.autoSendMessageDeliveryReceipts = YES;
xmppMessageDeliveryRecipts.autoSendMessageDeliveryRequests = YES;
[xmppMessageDeliveryRecipts activate:self.xmppStream];

但我想收到已读回执。请帮帮我。



Best Answer-推荐答案


XEP-0085 “事件”聊天状态基本上用作“已读回执”

关于ios - 在 iOS XMPP 聊天应用程序中读取回执,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24550065/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4