]> git.cworth.org Git - turbot/commitdiff
turbot_lambda: Inject /rot response into the same channel as the command
authorCarl Worth <cworth@cworth.org>
Mon, 12 Oct 2020 21:13:24 +0000 (14:13 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 12 Oct 2020 21:45:05 +0000 (14:45 -0700)
Prior to this commit, we were just including the rot result in the
response to the POST request. That was sufficient for Slack to take
the result and present it privately to the user that issued the
command. But that would not allow any other user in the same channel
to see the same result.

Here, instead, we use the Slack WebClient API to inject the result
into the user's channel as a new message. This takes advantage of a
new, encrypted SSM parameter SLACK_BOT_TOKEN to authenticate our
bot. It also requires bundling all of the virtualenv dependencies into
the zip file uploaded to AWS for the lambda, so that's what the
Makefile modifications do here.


No differences found