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

Fix id handling to close #897

This commit is contained in:
Dave Conway-Jones 2022-04-01 22:51:40 +01:00
parent fb9c90f68c
commit 757abe3209
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
2 changed files with 2 additions and 2 deletions

View File

@ -444,7 +444,7 @@ module.exports = function(RED) {
if (body) { if (body) {
var msg = { payload:body.getText(), subject:node.subject[stanza.attrs.from.split('/')[0]] }; var msg = { payload:body.getText(), subject:node.subject[stanza.attrs.from.split('/')[0]] };
var ids = stanza.attrs.from.split('/'); var ids = stanza.attrs.from.split('/');
if (ids[1].length !== 36) { if (ids.length > 1 && ids[1].length !== 36) {
msg.topic = stanza.attrs.from msg.topic = stanza.attrs.from
} }
else { msg.topic = ids[0]; } else { msg.topic = ids[0]; }

View File

@ -1,6 +1,6 @@
{ {
"name": "node-red-node-xmpp", "name": "node-red-node-xmpp",
"version": "0.5.9", "version": "0.5.10",
"description": "A Node-RED node to talk to an XMPP server", "description": "A Node-RED node to talk to an XMPP server",
"dependencies": { "dependencies": {
"@xmpp/client": "^0.13.0" "@xmpp/client": "^0.13.0"