powered by Jive Software

[MUC] using getJoinedRooms() for persistent rooms

Hi all,

I am probably missing smth regarding proper use of the API.

What I do is the following:

  1. Create a persistent room (by sending Conf form with muc#roomconfig_persistentroom set to true.
  2. Join it explicitly by calling join(“somenick”)
  3. Immediatelly after I call either
  4. MultiUserChat.getJoinedRooms(connection,myUserId+"/laptop" ); // laptop is the resource I use when doing login
  5. Or MultiUserChat.getJoinedRooms(connection,myUserId+"/somenick" );

In both cases I get nothing returned, but trying to trace the server (Tigase 5.0.0) I see the difference in the returned query results. For the 1st case I definitly see server returns the room’s JID. For the second case it indeed returns nothing.

What am I doing wrong here, generally? Any help will be appreciated.

I have additional question - is there any way to query server for all the rooms a user is member of, regardless the resource string/nickname? Can it be done with smack?



What does MultiUserChat.getJoinedRooms(XMPPConnection) return? Notice that this method does not take a second argument. The method you use causes a Service Discovery lookup on a remote FullJID and is meant to view the MUCs a remote user has joined. This may be not supported by every Jabber entity for privacy reasons.

Generally it’s a good idea to enable Smack Debug

and add Breakpoints to the getJoinedRooms method to debug such problems.

Hi Jan,

Sorry for late response (been busy with other task now back to MUC).

getJoinedRooms(connection) has private visibility in my version of smack (3.2.1) and as far as I have checked in 3.2.2 either.

how can it help me?