Skip to content

Commit 0a66983

Browse files
committed
1.3.9: Allow users to override the token when sending a request to Slack's API
1 parent 44462b7 commit 0a66983

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ util.inherits(slackAPI, eventEmitter);
9797
* @example reqAPI('rtm.start', {}, console.log)
9898
*/
9999
slackAPI.prototype.reqAPI = function (method, data, callback) {
100-
data.token = this.token;
100+
if(typeof data.token === 'undefined') data.token = this.token;
101101

102102
if (typeof data.attachments !== 'undefined') {
103103
data.attachments = JSON.stringify(data.attachments);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "slackbotapi",
3-
"version": "1.3.8",
3+
"version": "1.3.9",
44
"description": "a node.js API using Slack their RTM API",
55
"main": "lib/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)