From 5fc7d873d9d8ca9852df85d25da96646a41306b2 Mon Sep 17 00:00:00 2001 From: Olivier Verhaegen <56387556+OlivierVerhaegen@users.noreply.github.com> Date: Wed, 7 Jun 2023 14:49:21 +0200 Subject: [PATCH] Bugfix: backward compatible node.topic has prio + Docs: added info about msg.topic in ACK node docs --- io/stomp/18-stomp.html | 1 + io/stomp/18-stomp.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/io/stomp/18-stomp.html b/io/stomp/18-stomp.html index aa847128..df29ff14 100644 --- a/io/stomp/18-stomp.html +++ b/io/stomp/18-stomp.html @@ -197,6 +197,7 @@

The node allows for following inputs:

diff --git a/io/stomp/18-stomp.js b/io/stomp/18-stomp.js index cfe94461..a28186aa 100644 --- a/io/stomp/18-stomp.js +++ b/io/stomp/18-stomp.js @@ -420,7 +420,7 @@ module.exports = function(RED) { setStatusDisconnected(node); node.on("input", function(msg, send, done) { - const topic = msg.topic || node.topic; + const topic = node.topic || msg.topic; if (topic.length > 0 && msg.payload) { try { msg.payload = JSON.stringify(msg.payload); @@ -469,7 +469,7 @@ module.exports = function(RED) { setStatusDisconnected(node); node.on("input", function(msg, send, done) { - const topic = msg.topic || node.topic; + const topic = node.topic || msg.topic; if (topic.length > 0) { node.serverConnection.ack(topic, msg.messageId, msg.transaction); } else if (!topic.length > 0) {