如何在 ios 中的 open fire xmpp 中从另一端的花名册中删除聊天用户
how to remove chat user from roster in other end in open fire xmpp in ios
我必须解决打开 fire xmpp
的用户问题。
我在 DeviceA 中添加了 user_1,它正在向 user_2 DeviceB 发送请求,正在添加。
当我从 DeviceA 中删除 user_2 时,它应该删除 DeviceB 中的 user_1
但是 user_1 没有从 DeviceB 名册中删除
我没有收到 IQ 数据包subscription="remove"
我收到了 subscription="to"
和 subscription="none"
这样的 IQ 数据包
如何解决这个问题?
上述情况在 openfire 3.6
中按预期工作,但在 4.1 中出现问题。
根据 this defect seen on Openfire 3.6.4 but fixed as of 3.9.2. According to RFC-3921 第 8.6 节,我认为 Openfire 4.1 的行为是正确的:
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,如下所述:
- Delete a Friend from Roster in Xmpp/Openfire
您可以参考这里的最佳实践:
认为 Openfire 4.1 根据在 Openfire 3.6.4 上看到的这个缺陷正常运行,但从 3.9.2 开始修复。根据 RFC-3921 第 8.6 节:
当用户从用户名册中删除联系人时,联系人名册的结束状态为用户仍在联系人名册中,订阅状态为"none";为了完全删除用户的名册项目,联系人还需要发送名册删除请求。
要实现您想要的功能,您可以按照此处的讨论显式发送删除 IQ:
从 Xmpp/Openfire 中的花名册中删除一位朋友
你可以在这里参考最佳实践:
我必须解决打开 fire xmpp
的用户问题。
我在 DeviceA 中添加了 user_1,它正在向 user_2 DeviceB 发送请求,正在添加。
当我从 DeviceA 中删除 user_2 时,它应该删除 DeviceB 中的 user_1 但是 user_1 没有从 DeviceB 名册中删除
我没有收到 IQ 数据包
subscription="remove"
我收到了
这样的 IQ 数据包subscription="to"
和subscription="none"
如何解决这个问题?
上述情况在 openfire 3.6
中按预期工作,但在 4.1 中出现问题。
根据 this defect seen on Openfire 3.6.4 but fixed as of 3.9.2. According to RFC-3921 第 8.6 节,我认为 Openfire 4.1 的行为是正确的:
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,如下所述:
- Delete a Friend from Roster in Xmpp/Openfire
您可以参考这里的最佳实践:
认为 Openfire 4.1 根据在 Openfire 3.6.4 上看到的这个缺陷正常运行,但从 3.9.2 开始修复。根据 RFC-3921 第 8.6 节:
当用户从用户名册中删除联系人时,联系人名册的结束状态为用户仍在联系人名册中,订阅状态为"none";为了完全删除用户的名册项目,联系人还需要发送名册删除请求。 要实现您想要的功能,您可以按照此处的讨论显式发送删除 IQ:
从 Xmpp/Openfire 中的花名册中删除一位朋友 你可以在这里参考最佳实践: