3

I am developing an application which require to login-logout from the app. In that case, when I login into the application, at the same time I will Join the Group(where i am a occupant of group). Now, I want to leave group.

I have created one group and leave it using below code.

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

This query will only make my presence unavailable in group but he/she does not left conversation/group.

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

In the both case of setting presence unavailable at the time of logout from my application and to leave group are same.

So, how would other group members identify that member has left the group or just went offline.

Thanks in advance.`

Edit:

Suppose two member are in group(group name is "trees") A and B..Now we have 2 senario in which group went offline.

1: When user A leave group. what user B receive at their end is.

<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: When user A went offline. the open-fire will set user A presence unavailable for the groups where user A is a occupant. Now what other group member B received their end is.

<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>

In this both cases, other group member is not easily identify that user A just went offline or leave group?

Jatin Patel - JP
  • 3,725
  • 2
  • 21
  • 43

0 Answers0