From 2c49832bdaf8c035ef4b22cffe536e6756d367dd Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Tue, 27 Sep 2016 18:03:54 +0100 Subject: [PATCH] injecting blank payload stops twitter stream --- social/twitter/27-twitter.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/social/twitter/27-twitter.js b/social/twitter/27-twitter.js index b481f7ed..cbaa2978 100644 --- a/social/twitter/27-twitter.js +++ b/social/twitter/27-twitter.js @@ -246,9 +246,14 @@ module.exports = function(RED) { node.on("input", function(msg) { if (this.tags === '') { if (this.stream) { this.stream.destroy(); } - st = { track: [msg.payload] }; - setupStream(); - node.status({fill:"green", shape:"dot", text:msg.payload}); + if (msg.payload !== "") { + st = { track: [msg.payload] }; + setupStream(); + node.status({fill:"green", shape:"dot", text:msg.payload}); + } + else { + node.status({fill:"yellow", shape:"ring", text:RED._("twitter.warn.waiting")}); + } } //We shouldn't get into this state, but just incase, check for it else {