Add send to input handler signature

This commit is contained in:
Nick O'Leary
2019-07-09 11:40:55 +01:00
parent 3b5ea0f15f
commit f52289b2c3
4 changed files with 43 additions and 11 deletions

View File

@@ -81,7 +81,7 @@ module.exports = function(RED) {
}
}
this.on("input", function(msg, done) {
this.on("input", function(msg, send, done) {
if (this.complete === "true") {
// debug complete msg object
if (this.console === "true") {

View File

@@ -328,12 +328,12 @@ module.exports = function(RED) {
}
if (valid) {
this.on('input', function(msg, done) {
this.on('input', function(msg, send, done) {
applyRules(msg, 0, (err,msg) => {
if (err) {
node.error(err,msg);
} else if (msg) {
node.send(msg);
send(msg);
}
done();
})