mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
injecting blank payload stops twitter stream
This commit is contained in:
parent
4c5b75f30a
commit
2c49832bda
@ -246,10 +246,15 @@ module.exports = function(RED) {
|
|||||||
node.on("input", function(msg) {
|
node.on("input", function(msg) {
|
||||||
if (this.tags === '') {
|
if (this.tags === '') {
|
||||||
if (this.stream) { this.stream.destroy(); }
|
if (this.stream) { this.stream.destroy(); }
|
||||||
|
if (msg.payload !== "") {
|
||||||
st = { track: [msg.payload] };
|
st = { track: [msg.payload] };
|
||||||
setupStream();
|
setupStream();
|
||||||
node.status({fill:"green", shape:"dot", text:msg.payload});
|
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
|
//We shouldn't get into this state, but just incase, check for it
|
||||||
else {
|
else {
|
||||||
// node.warn("msg.payload passed in, but tag config is not blank, defaulting to tag config");
|
// node.warn("msg.payload passed in, but tag config is not blank, defaulting to tag config");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user