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.