Skip to content

Commit 8ce7314

Browse files
author
Samuel Mills (Henchman)
committed
Re-applied update 1.2.3 to 1.3
1 parent f809e7b commit 8ce7314

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ util.inherits(slackAPI, EventEmitter);
121121
// Protoypes
122122
slackAPI.prototype.reqAPI = function(method, data, callback) {
123123
data.token = this.token;
124+
if (typeof data.attachments !== 'undefined') {
125+
data.attachments = JSON.stringify(data.attachments);
126+
}
124127
request.post('https://slack.com/api/' + method, function (error, response, body) {
125128
if (!error && response.statusCode == 200) {
126129
if (!callback) {

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.0",
3+
"version": "1.3.1",
44
"description": "a node.js API using Slack their RTM API",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)