Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
Stei #1
Member since Oct 2016 · 31 posts
Group memberships: Members
Show profile · Link to this post
Subject: Muc members can't retrieve member list
I'm having an issue, where only the room owner can retrieve the member list, and the members cannot.

Here is the room configuration I submit:
  1. <iq id="MX_15" type="set" to="abc-1496980564842@muc.mydomain.net" xmlns="jabber:client">
  2.  <query xmlns="http://jabber.org/protocol/muc#owner">
  3.     <x type="submit" xmlns="jabber:x:data">
  4.       <field var="muc#roomconfig_roomname" type="text-single">
  5.         <value>Group Chat</value>
  6.       </field>
  7.       <field var="muc#roomconfig_roomdesc" type="text-single">
  8.         <value></value>
  9.       </field>
  10.       <field var="muc#roomconfig_persistentroom" type="boolean">
  11.         <value>1</value>
  12.       </field>
  13.       <field var="muc#roomconfig_publicroom" type="boolean">
  14.         <value>1</value>
  15.       </field>
  16.       <field var="muc#roomconfig_moderatedroom" type="boolean">
  17.         <value>0</value>
  18.       </field>
  19.       <field var="muc#roomconfig_membersonly" type="boolean">
  20.         <value>1</value>
  21.       </field>
  22.       <field var="muc#roomconfig_passwordprotectedroom" type="boolean">
  23.         <value>0</value>
  24.       </field>
  25.       <field var="muc#roomconfig_roomsecret" type="text-single">
  26.         <value></value>
  27.       </field>
  28.       <field var="muc#roomconfig_anonymity" type="list-single">
  29.         <value>semianonymous</value>
  30.       </field>
  31.       <field var="muc#roomconfig_changesubject" type="boolean">
  32.         <value>1</value>
  33.       </field>
  34.       <field var="muc#roomconfig_enablelogging" type="boolean">
  35.         <value>0</value>
  36.       </field>
  37.       <field var="logging_format" type="list-single">
  38.         <value>html</value>
  39.       </field>
  40.       <field var="muc#maxhistoryfetch" type="text-single">
  41.         <value>10</value>
  42.       </field>
  43.       <field var="tigase#presence_delivery_logic" type="list-single">
  44.         <value>PREFERE_PRIORITY</value>
  45.       </field>
  46.       <field var="tigase#presence_filtering" type="boolean">
  47.         <value>0</value>
  48.       </field>
  49.       <field var="tigase#presence_filtered_affiliations" type="list-multi" />
  50.       <field var="muc#roomconfig_getmemberlist" type="list-multi">
  51.         <value>moderator</value>
  52.         <value>participant</value>
  53.         <value>visitor</value>
  54.       </field>
  55.       <field var="muc#roomconfig_whois" type="list-single">anyone</field>
  56.     </x>
  57.  </query>
  58. </iq>

As you can see, "muc#roomconfig_getmemberlist" allows participants/visitors/moderators to get the member list. And "muc#roomconfig_whois" is set to anyone.

But when a member requests to retrieve member list:
  1. <iq id="MX_5" to="abc-1496980564842@muc.mydomain.net" type="get" xmlns="jabber:client">
  2.  <query xmlns="http://jabber.org/protocol/muc#admin">
  3.     <item affiliation="member" />
  4.  </query>
  5. </iq>

Response from server:
  1. <iq to="88888@mydomain.net/MatriX-Touch" id="MX_5" type="error" from="abc-1496980564842@muc.mydomain.net" xmlns="jabber:client">
  2.  <query xmlns="http://jabber.org/protocol/muc#admin">
  3.     <item affiliation="member" />
  4.  </query>
  5.  <error code="403" type="auth">
  6.     <forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
  7.  </error>
  8. </iq>

Here is the response when the owner requests the member list:
  1. <iq to="abc@mydomain.net/MatriX-for-Android" id="MX_16" type="result" from="abc-1496980564842@muc.mydomain.net" xmlns="jabber:client">
  2.  <query xmlns="http://jabber.org/protocol/muc#admin">
  3.     <item jid="88888@mydomain.net" affiliation="member" />
  4.     <item jid="0000@mydomain.net" affiliation="member" />
  5.  </query>
  6. </iq>
As you can see, "88888@mydomain.net" is a member, so he should be able to retrieve the member list.

Is there another setting I need to set before I submit the room configuration?
Avatar
Stei #2
Member since Oct 2016 · 31 posts
Group memberships: Members
Show profile · Link to this post
Nevermind, I managed to solve it. I simply changed the "muc#roomconfig_getmemberlist" field to have only one value of "visitor", and that seemed to fix it. Though I also removed the "type" attributes from each field too, so I'm not sure which change actually fixed it, as I did both changes at the same time.
Avatar
Alex #3
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
The first should have fixed it.
The type is optional and only required for the client, you don't need to send it back. Var and value is enough. But it shouldn't break anything when you send also the type back, the server will just ignore it.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS