Skip to content

Commit

Permalink
Use payload.topic if filter topic is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
cchi authored and Caprico85 committed Aug 12, 2024
1 parent 7af8b48 commit 203d887
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions devices/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -2173,6 +2173,9 @@ module.exports = function (RED) {
if(done) done();
return;
}
if (me.topic_filter && msg.payload.topic && (msg.topic || '').toString().startsWith(me.topicOut)) {
msg.topic = msg.payload.topic;
}
me._debug(".input: topic = " + msg.topic);

let upper_topic = '';
Expand Down

0 comments on commit 203d887

Please sign in to comment.