[ejabberd] Get members of room as occupant/member

Gaurav Jain monkeyfdude at gmail.com
Wed Dec 10 07:53:18 MSK 2014


As an occupant/member, I need to know all the "members" in the room with
ejabberd-14.x

I followed http://xmpp.org/extensions/xep-0045.html#getmemberlist

I got forbidden (401) for following stanze - Admin privilege required

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

If I change

    <query xmlns='http://jabber.org/protocol/muc#admin'>

from 'admin' to 'user' namespace, then I get status code 501 - Feature not
implemented


Would you know how can I get members of a room as an occupant or member?

I am not an admin/moderator in this use case.


XEP-0045 does say:

> Note: A service SHOULD also return the member list to any occupant in
> a members-only room; i.e., it SHOULD NOT generate a <forbidden/> error
> when a member in the room requests the member list. This functionality
> can assist clients in showing all the existing members even if some of
> them are not in the room, e.g. to help a member determine if another
> user should be invited. A service SHOULD also allow any member to
> retrieve the member list even if not yet an occupant.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20141209/9162bf02/attachment.html>


More information about the ejabberd mailing list