3

我正在开发一个需要从应用程序登录注销的应用程序。在这种情况下,当我登录应用程序时,我将同时加入群组(我是群组的成员)。现在,我想离开小组。

我创建了一个组并使用以下代码保留它。

<presence to="trees@conference.openfire.xyz.net" type="unavailable"/>

此查询只会让我出现unavailable在群组中,但他/她不会离开对话/群组。

how other group member know that user left group or just goes offline?

在从我的应用程序注销时设置状态不可用和离开组的两种情况下都是相同的。

那么,其他群组成员将如何识别该成员已离开群组或刚刚下线。

提前谢谢。`

编辑

假设有两个membergroup(组名是“trees”)A and B..现在我们有 2senario在哪个组去了offline

1:用户A离开组时。用户B最终收到的是什么。

<presence xmlns="jabber:client" from="trees@conference.openfire.xyz.net/A" to="B@openfire.xyz.net/5850341f" type="unavailable"><x xmlns="vcard-temp:x:update"><photo/></x><x xmlns="http://jabber.org/protocol/muc#user"><item jid="A@openfire.xyz.net/6e711e48" affiliation="admin" role="none"/></x></presence>

2:当用户A下线时。开火将为用户所在的组设置用户A存在。现在其他小组成员收到的结局是。unavailableAB

<presence xmlns="jabber:client" from="trees@conference.openfire.xyz.net/A" to="B@openfire.xyz.net/5850341f" type="unavailable"><x xmlns="vcard-temp:x:update"><photo/></x><x xmlns="http://jabber.org/protocol/muc#user"><item jid="A@openfire.xyz.net/5bdf2463" affiliation="admin" role="none"/></x></presence>

在这两种情况下,其他组成员都不容易识别出该用户A刚刚下线或离开组?

4

0 回答 0