1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

correctly join a chat room (#663)

This commit is contained in:
Andreas Martens 2020-07-10 12:30:44 +01:00 committed by GitHub
parent 8919edf0e6
commit bf94d320a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,7 +73,7 @@ module.exports = function(RED) {
node.status({fill:"green",shape:"dot",text:"connected"});
if ((node.join) && (node.from !== "")) {
// disable chat history
var to = node.to+'/'+node.nick;
var to = node.from+'/'+node.nick;
var stanza = new xmpp.Element('presence', {"to": to}).
c('x', { xmlns: 'http://jabber.org/protocol/muc' }).
c('history', { maxstanzas:0, seconds:1 });