Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Releases: localytics/lambda-slack-router

v1.8.1

21 Jul 18:48
Compare
Choose a tag to compare

Bump dependencies - necessary because of the reported growl vulnerability tj/node-growl#60.

v1.8.0

04 May 18:57
Compare
Choose a tag to compare

Largely a cosmetic update - bumps the runtime and dev dependencies, as well as updating the style to reflect the newer eslint guides. It also standardizes the documentation language.

v1.7.0

20 Oct 17:28
Compare
Choose a tag to compare

Response Structure

By default, the SlackBot will respond with the exact structure that slack expects. This will function properly using our scaffold because of the request template that we constructed:

"requestTemplates": {
  "application/x-www-form-urlencoded": "{\"body\" : $input.json(\"$\")}"
}

You can, however, set up your own function to build the structure of your responses by setting the structureResponse property of the configuration object that you pass to the SlackBot constructor. This example below will be sufficient to get API gateway working out of the box:

var slackbot = new SlackBot({
  structureResponse: function (response) {
    return { body: JSON.stringify(response) };
  }
});

v1.6.0

22 Sep 21:38
Compare
Choose a tag to compare

We've added the ability to respond to buttons!

See the slack documentation for more information on buttons.
The action configured must match the name value of the presented button.
There's no need to use inChannelResponse or ephemeralResponse since your provided message will replace the existing message when using the callback.

slackbot.addAction('buttonPress', function (event, callback) {
  callback(null, { text: "You pressed a button" });
});

v1.5.0

21 Jun 14:28
Compare
Choose a tag to compare

We've added the ability to configure a CloudWatch event on a schedule to keep the lambda alive. If the router sees that type of event come through, it will exit immediately in order to save as much processing time as possible. You can configure the slackbot with:

var slackbot = new SlackBot({ pingEnabled: true });

and then configure your event. More details in the README.

v1.4.0

10 Jun 22:27
Compare
Choose a tag to compare

This is a breaking change. In this release we pre-parse the information coming from slack such that the "body" property of the event object is already an object as opposed to a string. Additionally we now only support nodejs 4.3 on lambda, as we're taking advantage of the new callback function that does not halt execution when it is called.

v1.3.0

26 Apr 14:48
Compare
Choose a tag to compare

The entire event coming from slack and lambda is now being passed in to the commands. As such, the suggested naming for the first argument in the callback has been changed to event instead of options. Since it's using the built-in event, for upgrading you'll need to change userName to user_name if you were using that property on the options object.

v1.2.0

22 Mar 00:46
Compare
Choose a tag to compare

Now supports multi-word commands and aliased commands. Example of multi-word:

slackbot.addCommand('one two', 'desc', function () {});

Example of aliased commands:

slackbot.aliasCommand('one two', 'ot', '12');

v1.1.0

18 Mar 21:56
Compare
Choose a tag to compare

Optional arguments are now supported. This is a breaking change because the syntax for specifying arguments has now changed from being a space-separated string to being the second argument to the addCommand function. Example below:

slackbot.addCommand('test', ['one', 'two'], 'Test command', function() {});

v1.0.3

18 Mar 21:56
Compare
Choose a tag to compare

Initial public release