菜鸟教程小白 发表于 2022-12-11 18:26:49

ios - 如何在 ios 的 open fire xmpp 中从另一端的名册中删除聊天用户


                                            <p><p>我必须通过打开 <code>fire xmpp</code> 来解决用户问题。</p>

<ol>
<li><p>我在 DeviceA 中添加了 user_1,它正在向 user_2 DeviceB 发送请求,正在添加中。</p></li>
<li><p>当我从 DeviceA 中删除 user_2 时,它应该删除 DeviceB 中的 user_1
但 user_1 没有从 DeviceB 名册中删除 </p></li>
<li><p>我没有收到 IQ 数据包<code>subscription="remove"</code></p>

<p>我收到了像 <code>subscription="to"</code> 和 <code>subscription="none"</code> 这样的 IQ 数据包 </p>

<p>如何解决这个问题? </p></li>
</ol>

<p>上述场景在 <code>openfire 3.6</code> 中按预期工作,但在 4.1 中出现问题。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>根据 <a href="https://issues.igniterealtime.org/browse/OF-24" rel="noreferrer noopener nofollow">this defect</a>,我认为 Openfire 4.1 的行为正确。在 Openfire 3.6.4 上看到,但从 ​​3.9.2 开始修复。根据 <a href="https://www.rfc-editor.org/rfc/rfc3921" rel="noreferrer noopener nofollow">RFC-3921</a>第 8.6 节:</p>
<blockquote>
<p>When the user removes the contact from the user&#39;s roster, the end
state of the contact&#39;s roster is that the user is still in the
contact&#39;s roster with a subscription state of &#34;none&#34;; in order to
completely remove the roster item for the user, the contact needs to
also send a roster removal request.</p>
</blockquote>
<p>要实现您想要的,您可以显式发送删除 IQ,如下所述:</p>
<ul>
<li> <a href="https://stackoverflow.com/questions/14317580/delete-a-friend-from-roster-in-xmpp-openfire" rel="noreferrer noopener nofollow">Delete a Friend from Roster in Xmpp/Openfire</a> </li>
</ul>
<p>您可以在这里引用最佳实践:</p>
<ul>
<li> <a href="https://xmpp.org/extensions/xep-0162.html#removal" rel="noreferrer noopener nofollow">https://xmpp.org/extensions/xep-0162.html#removal</a> </li>
</ul></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 如何在 ios 的 open fire xmpp 中从另一端的名册中删除聊天用户,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/41375164/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/41375164/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 如何在 ios 的 open fire xmpp 中从另一端的名册中删除聊天用户