powered by Jive Software

aSmack muc.getMembers() Forbidden (403) OPENFIRE

I would like to allow any chat room member to get a list of all of the members. Currently, only users who are moderators may do so. I cannot seem to find where I need to set / change the user privileges to allow for this.

If logged in as a moderator the following code works:

 try { Collection<Affiliate> members = muc.getMembers(); System.out.println(members.size()); } catch(XMPPException e) { e.printStackTrace(); }

If logged in as a normal member, the above code throws a Forbidden 403 error.

 06-25 19:53:51.198: W/System.err(12943): forbidden(403) 06-25 19:53:51.208: W/System.err(12943):   at org.jivesoftware.smackx.muc.MultiUserChat.getAffiliatesByAdmin(MultiUserChat.java:1743) 06-25 19:53:51.208: W/System.err(12943):   at org.jivesoftware.smackx.muc.MultiUserChat.getMembers(MultiUserChat.java:1657)

Any advice would be much appreciated.

Note: My overall goal is to get a list of everyone who has at some point connected to the muc. This list needs to be accessible to both moderators and normal members. Currently only moderators can use the getMembers() method. My approach was to have new users register with the room, although if there is a simpler way to get this list I am all ears.