Project

General

Profile

Incorrect room names for non-persistent rooms

Wenjun Che
Added about 5 years ago

Hello,

When I create a non persistent room, the name returned in the room query does not match what I configured set it to be. Instead it is equal to the ID of the room.

Example:

Configure Room (To Server). The name of the room is set to ROOMNAME and the room is NOT persistent.

<iq xmlns="jabber:client" to="id21529@muc.server.com" type="set" id="16:sendIQ">
      <query xmlns="http://jabber.org/protocol/muc#owner">
         <x xmlns="jabber:x:data" type="submit">
            <field var="muc#roomconfig_roomname">
               <value>ROOMNAME</value>
            </field>
            <field var="muc#roomconfig_roomdesc">
               <value />
            </field>
            <field var="muc#roomconfig_persistentroom">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_publicroom">
               <value>1</value>
            </field>
            <field var="muc#roomconfig_moderatedroom">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_membersonly">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_passwordprotectedroom">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_roomsecret">
               <value />
            </field>
            <field var="muc#roomconfig_anonymity">
               <value>nonanonymous</value>
            </field>
            <field var="muc#roomconfig_changesubject">
               <value>0</value>
            </field>
            <field var="muc#roomconfig_enablelogging">
               <value>0</value>
            </field>
            <field var="logging_format">
               <value>html</value>
            </field>
            <field var="muc#maxhistoryfetch">
               <value>50</value>
            </field>
         </x>
      </query>
   </iq>

Query Room List (To Server)

<iq xmlns="jabber:client" to="muc.server.com" from="user@server.com/tigase-17" type="get" id="19:sendIQ">
      <query xmlns="http://jabber.org/protocol/disco#items" />
 </iq>

Room List Response (From Server)

<iq xmlns="jabber:client" id="19:sendIQ" from="muc.server.com" to="user@server.com/tigase-17" type="result">
   <query xmlns="http://jabber.org/protocol/disco#items">
      <item name="id21529" jid="id21529@muc.server.com" />
   </query>
</iq>

As you can see, in the last stanza, the name of the chatroom is NOT "ROOMNAME" but rather the ID of the room.

If I set the room to be persistent, I don't run into this issue.

Could you help me diagnose the problem? I am using tigase-server-5.2.0-SNAPSHOT-b3415.

Thanks,

Troy


Replies (11)

Avatar?id=6098&size=32x32

Added by Bartosz Małkowski TigaseTeam about 5 years ago

Fixed.

Thank you!

Added by Troy Mestler about 5 years ago

I have verified that fix for non-persistent rooms that are public, but

the same problem occurs when the list is "non-public" (i.e.: muc#roomconfig_publicroom: 0).

Could you take a look at this too?

Avatar?id=6098&size=32x32

Added by Bartosz Małkowski TigaseTeam about 5 years ago

Of course. Tomorrow.

You mean that server sends

<item name="id21529" jid="id21529@muc.server.com" />

instead of

<item name="Yo Ho Ho And Bottle Of Rum" jid="id21529@muc.server.com" />

when muc#roomconfig_publicroom=false?

Added by Troy Mestler about 5 years ago

That's correct.

Added by Troy Mestler about 5 years ago

Also,

when I retrieve info about the non-public chatroom, the name is not included in the element.

Here's an example:

To Server:

<iq to=​"room@muc.server.com" from=​user@server.com/​tigase-24" type=​"get" xmlns=​"jabber:​client" id=​"25:​sendIQ">​
<query xmlns=​"http:​/​/​jabber.org/​protocol/​disco#info">​</query>​
</iq>​

Here's the response:

<iq xmlns=​"jabber:​client" id=​"25:​sendIQ" type=​"result" to=​"user@server.com/​tigase-24" from=​"room@muc.server.com">​
<query xmlns=​"http:​/​/​jabber.org/​protocol/​disco#info">​
*<identity name category=​"conference" type=​"text">​</identity>​*
<feature var=​"http:​/​/​jabber.org/​protocol/​muc">​</feature>​
<feature var=​"muc_semianonymous">​</feature>​
<feature var=​"muc_unmoderated">​</feature>​
<feature var=​"muc_open">​</feature>​
<feature var=​"muc_temporary">​</feature>​
*<feature var=​"muc_public">​</feature>​*
<feature var=​"muc_unsecured">​</feature>​
</query>​
</iq>​

There's another bug: as you can see above, the response indicates that the room is public, even though it is not public.

Bartosz Malkowski wrote:

Of course. Tomorrow.

You mean that server sends

[...]

instead of

[...]

when muc#roomconfig_publicroom=false?

Added by Troy Mestler about 5 years ago

In addition, the room query says that the room is "semi-anonymous" and "open" to the public, when in fact the room I have configured is "nonanonymous" and "membersonly".

Added by Troy Mestler about 5 years ago

Im afraid there were some errors on my client when I was doing the testing. I believe the fix is okay. No need to look at it. Sorry about that.

Avatar?id=6098&size=32x32

Added by Bartosz Małkowski TigaseTeam about 5 years ago

Room with muc#roomconfig_publicroom=0 is not listed in disco#items.

It doesn't have muc_public feature, but I see muc_hidden feature instead.

Make sure your room is non-public :-)

I can't confirm your problems with nonanonymous and membersonly. For me it works fine.

Added by Troy Mestler about 5 years ago

Ok, Thanks for this fix. I have your fix running with tigase-server-5.3.0-SNAPSHOT-b3458, but I am running into the same problem for PERSISTENT rooms WITH escape sequences in the node of the JID. The JID of the chatroom appears as the name of the chatroom.

Here are the steps for recreating the problem:

1) Create a persistent room with an escape sequence in the JID: "some\20roomid@muc.server.com" and the name is "room name"

2) Join the room.

3) Leave the room.

4) Query the list of rooms

5) The server will return this:

<iq xmlns="jabber:client" id="19:sendIQ" from="muc.server.com" to="user@server.com/tigase-17" type="result">
   <query xmlns="http://jabber.org/protocol/disco#items">
      <item name="some\20roomid@muc.server.com" jid="some\20roomid@muc.server.com" />
   </query>
</iq>

The name attribute should be "room name"

6) If the name does not have an escape sequence, I do NOT see the problem--the name in the room list is what it should be.

Can you all take a look at it?

Thanks a lot,

Troy

Added by Wenjun Che about 5 years ago

Hello all,

Any updates on this item?

Avatar?id=6098&size=32x32

Added by Bartosz Małkowski TigaseTeam about 5 years ago

Sorry I can't reproduce it.

<iq from="muc.coffeebean.local" type="result" to="alice@coffeebean.local/Psi+" id="ab42a">
<query xmlns="http://jabber.org/protocol/disco#items">
<item name="Pokoj 001 z babolem" jid="some\20roomid@muc.coffeebean.local"/>
<item name="Pokoj 001" jid="test001@muc.coffeebean.local"/>
</query>
</iq>

    (1-11/11)