|
|
@@ -21,6 +21,10 @@ module.exports = function(crowi) {
|
|
|
|
|
|
const postWithWebApi = function(messageObj, callback) {
|
|
|
const client = new Slack(config.notification['slack:token']);
|
|
|
+ // stringify attachments
|
|
|
+ if (messageObj.attachments != null) {
|
|
|
+ messageObj.attachments = JSON.stringify(messageObj.attachments);
|
|
|
+ }
|
|
|
client.api('chat.postMessage', messageObj, callback);
|
|
|
}
|
|
|
|