powered by Jive Software

Get list of rooms

Hi all,

i was searching through the forum for how to get list of rooms with XIFF. There were few conversations, but none works. I’ve tried Browser and Disco#items, but really don’t know how get that list of rooms. If you know, please can you gimme me some advice? XML command is much more than enough…

thank you very much

Browser and Disco#items does work:

private var connection:XMPPConnection;
private var browser:Browser;
private var rooms:Array; private function getRooms():void
{
     var conferenceServer:String = "conference." + connection.server;
     var server:EscapedJID = new EscapedJID( conferenceServer );
     browser = new Browser( connection );
     browser.getServiceItems( server, onGetServiceItems );
}
private function onGetServiceItems( iq:IQ ):void
{
     var extensions:Array = iq.getAllExtensions();
     var disco:ItemDiscoExtension = extensions.length > 0 ? extensions[ 0 ] : null;
     if( disco )
     {
         rooms = disco.items.concat();
     }
}

Thank you Mark,

I was close, 5 minutes ago I’ve tried browser.getServiceItems with wrong server jid. Whole time I’ve tried different combinations, but not this one. Thank you for your fast help

Franto