untweaked and retweaked Tweet

This commit is contained in:
Dave C-J
2013-10-02 23:37:26 +01:00
parent e316c4734f
commit 5c8b2f20db
2 changed files with 14 additions and 16 deletions

View File

@@ -27,7 +27,7 @@ RED.nodes.registerType("twitter-credentials",TwitterNode);
function TwitterInNode(n) {
RED.nodes.createNode(this,n);
this.active = true;
this.oper = n.operation;
this.user = n.user;
this.tags = n.tags.replace(/ /g,'');
this.twitter = n.twitter;
this.topic = n.topic;
@@ -46,8 +46,7 @@ function TwitterInNode(n) {
if (this.tags !== "") {
try {
var thing = 'statuses/filter';
if (this.oper === "user") { thing = 'user'; }
if (this.oper === "site") { thing = 'site'; }
if (this.user == "true") { thing = 'user'; }
function setupStream() {
if (node.active) {
twit.stream(thing, { track: [node.tags] }, function(stream) {