hedwig-im / hedwig_slack

Slack Adapter for Hedwig
MIT License
45 stars 30 forks source link

Added support for chat.postMessage API. #17

Closed radglob closed 2 years ago

radglob commented 4 years ago

I wanted to be able to send messages using the chat.postMessage API, but didn't want it to be too unwieldy to do so. This piggybacks off of most of the existing adapter code, pattern matching on the shape of the response sent via send/2 or reply/2 to dispatch to the chat.Postmessage endpoint if the response is a map including either attachments or blocks keys.