Skip to content

Commit

Permalink
extend slack_botkit.middleware.format middleware
Browse files Browse the repository at this point in the history
add blocks filed to platform message
  • Loading branch information
ihorrusinko committed Feb 20, 2019
1 parent b696884 commit c649434
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/SlackBot.js
Expand Up @@ -573,6 +573,8 @@ function Slackbot(configuration) {
platform_message.link_names = message.link_names || null;
platform_message.attachments = message.attachments ?
JSON.stringify(message.attachments) : null;
platform_message.blocks = message.blocks ?
JSON.stringify(message.blocks) : null;
platform_message.unfurl_links = typeof message.unfurl_links !== 'undefined' ? message.unfurl_links : null;
platform_message.unfurl_media = typeof message.unfurl_media !== 'undefined' ? message.unfurl_media : null;
platform_message.icon_url = message.icon_url || null;
Expand Down

0 comments on commit c649434

Please sign in to comment.