AnsweredAssumed Answered

MUC getJoinedRooms(userJid) returns empty.

Question asked by Centerback on Nov 11, 2016
Latest reply on Nov 15, 2016 by Centerback

Hi

I am trying to get list of MUC Rooms that I am a member of.

I am using MultiUserChatManager.getJoinedRooms(userJabberId);

 

It always return empty list when calling MultiUserChatManager.getJoinedRoom(user@service/resource).

I looked into the packet created, and it looks like this:

<iq to='alpha@192.168.100.226'

  id='X0m2c-91'

  type='get'>

    <query xmlns='http://jabber.org/protocol/disco#items'

      node='http://jabber.org/protocol/muc#rooms'></query>

</iq>

 

Now, according to the Xmpp docs (XEP-0045: Multi-User Chat ) the packet should looks like this:

<iq from='hag66@shakespeare.lit/pda'
   
id='lx09df27'
   
to='chat.shakespeare.lit'
   
type='get'>
 
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>

 

It seems in my packet, from attribute is missing, and to attribute should be the MUC ServiceAddress.

 

My question is:

1. Am I using the correct function (getJoinedRooms) to get the Rooms that i am a member of?

2. If this is the correct function, is there a bug in ServiceDiscoveryManager.getInstanceFor(connection()).discoverItems(user, DISCO_NODE) ?

 

Any advice is really appreciated!

Outcomes