createRoom() {
this.nick = this.name;
this.room_name = this.nick + this.conf;
console.log(this.room_name);
this.mucCreateRoom(this.room_name);
}
mucCreateRoom(room_name)
{
this.connection.muc.init(this.connection);
//this.mucSendPresence(room_name);
var presence = $pres({
to: room_name
console.log(presence.tree());
this.connection.send(presence.tree());
this.connection.muc.createInstantRoom(room_name,
function (status) {
console.log("Succesfully created ChatRoom", status);
},
function (status) {
console.log("Error creating ChatRoom", status);
}
);
}
hello what is wrong in this code to create room on strophe.
i have got error in connection. it shows disconnected