Answer the question
In order to leave comments, you need to log in
Groups in XMPP/ MUC XMPP ?
Who worked with MUC XMPP, tell me "How to join a group and send / receive a message from this group"?
I use Strophe + openfire.
I have already learned how to communicate with other users directly, how to do it in a general chat xs.
Answer the question
In order to leave comments, you need to log in
Here's what I got.
var o = {to:'имя_комнаты@доммен/ник_в_комнате'};
var m = $pres(o);
m.c('x', {xmlns : 'http://jabber.org/protocol/muc#user'}, null);
connection.send(m.tree());
var o = {to:'имя_комнаты@доммен/ник_в_комнате'};
var m = $pres(o);
m.c('x', {xmlns : 'http://jabber.org/protocol/muc#user'}, null).c('password', null, 'pass');
connection.send(m.tree());
var o = {to:'имя_комнаты@доммен', type : 'groupchat'};
var m = $msg(o); m.c('body', null, 'hello');
connection.send(m.tree());
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question