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

Commit

Permalink
Updated changelog
Browse files Browse the repository at this point in the history
Updated jest-cli version for security fixes
Slight change to method used to normalize block_actions events
  • Loading branch information
benbrown committed Feb 25, 2019
1 parent 26b855b commit 68f18dd
Show file tree
Hide file tree
Showing 5 changed files with 1,532 additions and 2,523 deletions.
5 changes: 4 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@

[Want to contribute? Read our guide!](https://github.com/howdyai/botkit/blob/master/CONTRIBUTING.md)

# Next minor release (changes in master)
# 0.7.4

* only require simple_storage when used: [#1566](https://github.com/howdyai/botkit/pull/1566)
* Slack: [Extend support of blocks](https://github.com/howdyai/botkit/pull/1597) - Thanks to [@ihorrusinko](https://github.com/ihorrusinko)
* Slack: [Add new block_actions events](https://github.com/howdyai/botkit/pull/1596) - Thanks to [@makstaks](https://github.com/makstaks)
* [Updated docs for using blocks with Slack](https://botkit.ai/docs/readme-slack.html#interactive-messages) - Thanks to [@makstaks](https://github.com/makstaks)

# 0.7.3

Expand Down
8 changes: 4 additions & 4 deletions lib/SlackBot.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,15 +561,15 @@ function Slackbot(configuration) {

slack_botkit.middleware.normalize.use(function handleBlockActions(bot, message, next) {

if (message.trigger_id) {
if (message.trigger_id && message.type === 'block_actions') {

// normalize fields to match the rtm message format
message.user = message.user.id;
message.channel = message.channel.id;

if (message.type == 'block_actions') {
message.text = message.actions[0].value;
}
// move the first action's value into text field
// this allows conversations to "hear" the action value
message.text = message.actions[0].value;
}

next();
Expand Down
2 changes: 1 addition & 1 deletion lib/Slackbot_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ module.exports = function(botkit, config) {
bot.findConversation = function(message, cb) {
botkit.debug('CUSTOM FIND CONVO', message.user, message.channel, message.type);
if (message.type == 'direct_message' || message.type == 'direct_mention' || message.type == 'ambient' || message.type == 'mention' || message.type == 'slash_command' ||
message.type == 'outgoing_webhook' || message.type == 'interactive_message_callback') {
message.type == 'outgoing_webhook' || message.type == 'interactive_message_callback' || message.type == 'block_actions') {
for (var t = 0; t < botkit.tasks.length; t++) {
for (var c = 0; c < botkit.tasks[t].convos.length; c++) {
if (
Expand Down
Loading

0 comments on commit 68f18dd

Please sign in to comment.