Does anyone have an idea on how to get the MultiUserChat instance that is associated with a HostedRoom? I am trying to join a room after being invited but I have a little problem. The invite() method sends the string name of the room not the actual MultiUserChat, and the MultiUserChat.getHostedRooms(); returns a list of HostedRooms. How do I get the MultiUserChat instances which are associated with these “Hosted Rooms” in order to call muc.join(); method.
Message was edited by: the.eagle
Well if invite sends the room name why can you not just do
MultiUserChat(XMPPConnection connection, String room)
From the Javadocs
Creates a new multi user chat with the specified connection and room name.
I cannot do that because the room is already created I am trying to join the room after receiving an invitation. What you suggested, I believe, would attempt to create a duplicate room with the same name as the room I am trying to join.
It wouldnt afaik. Calling
MultiUserChat muc = new MultiUserChat(conn, roomName);
when you have received an invitation will not create a new room. You will simply join the room you have been invited to.
Ok I guess I was mistaken.