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

标题: ios - 如何在 ios 的 open fire xmpp 中从另一端的名册中删除聊天用户 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 18:26
标题: ios - 如何在 ios 的 open fire xmpp 中从另一端的名册中删除聊天用户

我必须通过打开 fire xmpp 来解决用户问题。

  1. 我在 DeviceA 中添加了 user_1,它正在向 user_2 DeviceB 发送请求,正在添加中。

  2. 当我从 DeviceA 中删除 user_2 时,它应该删除 DeviceB 中的 user_1 但 user_1 没有从 DeviceB 名册中删除

  3. 我没有收到 IQ 数据包subscription="remove"

    我收到了像 subscription="to"subscription="none" 这样的 IQ 数据包

    如何解决这个问题?

上述场景在 openfire 3.6 中按预期工作,但在 4.1 中出现问题。



Best Answer-推荐答案


根据 this defect,我认为 Openfire 4.1 的行为正确。在 Openfire 3.6.4 上看到,但从 ​​3.9.2 开始修复。根据 RFC-3921第 8.6 节:

When the user removes the contact from the user's roster, the end state of the contact's roster is that the user is still in the contact's roster with a subscription state of "none"; in order to completely remove the roster item for the user, the contact needs to also send a roster removal request.

要实现您想要的,您可以显式发送删除 IQ,如下所述:

您可以在这里引用最佳实践:

关于ios - 如何在 ios 的 open fire xmpp 中从另一端的名册中删除聊天用户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41375164/






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