Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1597 from ihorrusinko/master
Browse files Browse the repository at this point in the history
slack api - extend support of blocks
  • Loading branch information
benbrown authored Feb 25, 2019
2 parents 22390b5 + 246b577 commit 26b855b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/Slack_web_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,14 @@ module.exports = function(bot, config) {
bot.log.error('Could not parse attachments', err);
}
}
if (options.blocks && typeof(options.blocks) != 'string') {
try {
options.blocks = JSON.stringify(options.blocks);
} catch (err) {
delete options.blocks;
bot.log.error('Could not parse blocks', err);
}
}
}


Expand Down

0 comments on commit 26b855b

Please sign in to comment.