diff --git a/social/twitter/27-twitter.html b/social/twitter/27-twitter.html index 94fd76c8..60276c84 100644 --- a/social/twitter/27-twitter.html +++ b/social/twitter/27-twitter.html @@ -124,7 +124,7 @@
  • all tweets by specific users
  • direct messages received by the authenticated user
  • -

    Use space for and and comma , for or when searching for multiple terms.

    +

    Use space for and and comma , for or when searching for multiple terms. If you want to pass in the term(s) via the msg.payload, leave the field blank.

    Sets the msg.topic to tweets/ and then appends the senders screen name.

    Sets msg.location to the tweeters location if known.

    Sets msg.tweet to the full tweet object as documented by Twitter. @@ -140,7 +140,7 @@ color:"#C0DEED", defaults: { twitter: {type:"twitter-credentials",required:true}, - tags: {value:"",validate:function(v) { return this.user == "dm" || v.length > 0;}}, + tags: {value:""}, user: {value:"false",required:true}, name: {value:""}, topic: {value:"tweets"} @@ -184,6 +184,16 @@ }); $("#node-input-user").change(); + }, + oneditsave: function() { + if ($('#node-input-tags').val() == '' && $("#node-input-user option:selected").val() != 'dm' + && $("#node-input-user option:selected").val() != 'user') { + this.inputs=1; + } + else { + //set back the default state of 0 inputs + this.inputs=0; + } } }); diff --git a/social/twitter/27-twitter.js b/social/twitter/27-twitter.js index f0e24e04..fd7bf221 100644 --- a/social/twitter/27-twitter.js +++ b/social/twitter/27-twitter.js @@ -89,6 +89,7 @@ module.exports = function(RED) { node.poll_ids = []; node.since_ids = {}; var users = node.tags.split(","); + if (users == '') node.warn("User option selected but no users specified"); for (var i=0;i