Disable MUC history on join
Closed this issue · 1 comments
artdevgame commented
Hey,
I'd like to be able to disable history on join of a room
this.join = function(to) {
$.ready(function() {
var stanza = new xmpp.Element('presence', { to: to }).
c('x', { xmlns: 'http://jabber.org/protocol/muc' }).
c('history', { maxstanzas: 0, seconds: 1});
conn.send(stanza);
});
};
Perhaps make it configurable?
Cheers.
artdevgame commented
Managed to do this myself using the online event:
Xmpp.on('online', function() {
var to = Config.xmpp.roomJid + '/' + Config.xmpp.roomNick;
// disable chat history
var stanza = new Xmpp.Element('presence', {"to": to}).
c('x', { xmlns: 'http://jabber.org/protocol/muc' }).
c('history', { maxstanzas: 0, seconds: 1});
Xmpp.conn.send(stanza);
// join the group chat
Xmpp.join(to);
});