Skip to content

Commit

Permalink
1.3.9: Allow users to override the token when sending a request to Sl…
Browse files Browse the repository at this point in the history
…ack's API
  • Loading branch information
xBytez committed May 23, 2016
1 parent 44462b7 commit 0a66983
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ util.inherits(slackAPI, eventEmitter);
* @example reqAPI('rtm.start', {}, console.log)
*/
slackAPI.prototype.reqAPI = function (method, data, callback) {
data.token = this.token;
if(typeof data.token === 'undefined') data.token = this.token;

if (typeof data.attachments !== 'undefined') {
data.attachments = JSON.stringify(data.attachments);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "slackbotapi",
"version": "1.3.8",
"version": "1.3.9",
"description": "a node.js API using Slack their RTM API",
"main": "lib/index.js",
"scripts": {
Expand Down

0 comments on commit 0a66983

Please sign in to comment.