4

In Openfire using XMPP, when I create a persistent room, users can add if they are invited.

When I send an invite to a user for room joining it will join using:

<presence from="jid@hostname.com/resource" to="groupname@servicename.hostname.com/nickname">
    <x xmlns="http://jabber.org/protocol/muc" />
</presence>

The newly added participant is member of that room. When I want to leave the room, we use

<presence type="unavailable" to="groupname@servicename.hostname.com" from="jid@hostname.com" > 

Using that they leaves room but are not getting deleted from the memberlist of that room.

How to remove from yourself from the memberlist?

I am requesting the member list with:

<iq from='crone1@shakespeare.lit/desktop' id='member3' to='coven@chat.shakespeare.lit' type='get'>
    <query xmlns='http://jabber.org/protocol/muc#admin'>
       <item affiliation='member'/>
    </query>
</iq>

or in Openfire there is link:

Group Chat -> Room Administration -> User Permissions

Which shows the actual list of all members with their permissions.

John Hascall
  • 9,176
  • 6
  • 48
  • 72
Mohsin Patel
  • 226
  • 1
  • 15
  • How are you checking the members list of the room? – Uluk Biy Sep 22 '14 at 09:05
  • note that in openfire GUI, the user is set as Room Member in Room Members section. hence that user want leave the room as well as that user name should be removed from that section as well. – Mohsin Patel Sep 22 '14 at 11:17
  • Well didn't tried with strophe, but quick test with 2 spark clients, inviting one from other, and leaving the room works as expected. The left user both gets deleted from spark room member list and from openfire group occupants page. Are you sure that there is ack for the presence type='unavailable' and this presence also broadcasted to other members of the room. – Uluk Biy Sep 22 '14 at 12:23
  • Yes! all other members get that broadcast message. i.e. presence type='unavailable' – Mohsin Patel Sep 23 '14 at 03:30
  • @MohsinPatel Have you any solution about removing user from group chat? – Sunil Zalavadiya Apr 14 '15 at 11:05
  • @sunilz the owner and admin of group can remove group member by setting users subscription="none" but still not get any solution of removing member by itself. Sorry. – Mohsin Patel Apr 15 '15 at 05:20
  • @MohsinPatel Hmm, I did not also get user removed after setting subscription="none". How you did that? – Sunil Zalavadiya Apr 15 '15 at 05:57

0 Answers0