SpiderStrategies / node-tweet-stream

Node twitter module to hook into the public filter streaming, seamlessly updating the tracking keywords.
210 stars 43 forks source link

fix: Oauth credentials check #33

Closed MethodGrab closed 9 years ago

MethodGrab commented 9 years ago

Currently, if any of the 4 oauth params are specified, the test on L27 will pass and will not throw the error on L28.

Consider the following examples:

var a = true, b = true, c = true;
!(a || b || c ); // false as expected

var a = true, b = true, c = null;
!(a || b || c ); // still false, but missing required param `c`!

// fixed version:
var a = true, b = true, c = null;
(!a || !b || !c); // true as expected

Also consider handling status code 401 errors inside Twitter.prototype.connect.

nathanbowser commented 9 years ago

Thanks!

nathanbowser commented 9 years ago

+ node-tweet-stream@1.8.3 released.

MethodGrab commented 9 years ago

Wow, that was quick! :+1: