Если у вас уже есть соединение с jabber (con), вот краткий пример того, как подключиться к групповому чату.
//Set the JID with resource
//Example: my_username@my_domain/my_chat_client
var u_jid = "my_username@my_domain/my_chat_client"
//Set the Full Room ID with your username as the resource
//Example: room_name@conference.my_domain/my_username
var full_room_id = "room_name@conference.my_domain/my_username";
var joinPacket = new JSJaCPresence();
joinPacket.setTo(full_room_id);
//Build item affiliation element
var inode = joinPacket.buildNode("item");
inode.setAttribute("affiliation","none");
inode.setAttribute("jid",u_jid);
inode.setAttribute("role","participant");
//Build X Element (with item affiliation child)
var xnode = joinPacket.buildNode("x", [inode]);
xnode.setAttribute("xmlns", "http://jabber.org/protocol/muc#user");
//Append new nodes to join packet
joinPacket.appendNode(xnode);
//Set status in room
joinPacket.setStatus('available');
var success = con.send(joinPacket, function(data) { console.log(data.getDoc()); });