Strophe room creation

39 views
Skip to first unread message

Madhan Kumar

unread,
Jun 26, 2019, 11:49:27 AM6/26/19
to Strophe
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
}).c('x', { 'xmlns': 'http://jabber.org/protocol/muc' });
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

Reply all
Reply to author
Forward
0 new messages