Skip to content
This repository has been archived by the owner on Aug 25, 2018. It is now read-only.

Commit

Permalink
Dump node-oauth workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
jdub committed Mar 11, 2012
1 parent a4c6dd4 commit f316eb8
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions lib/twitter.js
Expand Up @@ -86,14 +86,6 @@ Twitter.prototype.post = function(url, content, content_type, callback) {
if (url.charAt(0) == '/')
url = this.options.rest_base + url;

// Workaround: oauth + booleans == broken signatures
if (content && typeof content === 'object') {
Object.keys(content).forEach(function(e) {
if ( typeof content[e] === 'boolean' )
content[e] = content[e].toString();
});
}

this.request.post(url, {form: content}, _handleTwitterResponse(callback));
return this;
}
Expand Down Expand Up @@ -129,17 +121,8 @@ Twitter.prototype.stream = function(method, params, callback) {
// Stream type customisations
if (method === 'user') {
stream_base = this.options.user_stream_base;
// Workaround for node-oauth vs. twitter commas-in-params bug
if ( params && params.track && Array.isArray(params.track) ) {
params.track = params.track.join(',')
}

} else if (method === 'site') {
stream_base = this.options.site_stream_base;
// Workaround for node-oauth vs. twitter double-encode-commas bug
if ( params && params.follow && Array.isArray(params.follow) ) {
params.follow = params.follow.join(',')
}
}

var stream = new streamparser();
Expand Down

0 comments on commit f316eb8

Please sign in to comment.