HubSpot / slack-client

An asynchronous HTTP client for Slack's web API
Apache License 2.0
114 stars 53 forks source link

Add blocks for messages. #304

Closed nliutyi-hs closed 1 year ago

nliutyi-hs commented 1 year ago

This PR adds message blocks, which are passed by Slack in the message_action payload. This will allow us to work with user messages in a much more sufficient way, removing the need to parse the Slack markdown text itself, but giving the flexibility to work with blocks.

We've used this code version in our QA env and there were no exceptions regarding to it in our runtime.

nliutyi-hs commented 1 year ago

@motnyk Regarding the example payload, I thought that message_action.json is a good example, and there is no need to duplicate it, but I should've mentioned this in the PR's description.

nliutyi-hs commented 1 year ago

@motnyk Gonna simplify the payload and build the message blocks in the code, for decent comparison.

motnyk commented 1 year ago

Regarding the example payload, I thought that message_action.json is a good example, and there is no need to duplicate it, but I should've mentioned this in the PR's description.

That's a good call, I haven't really gotten to it yet at a point when I realized that I missed an example to simplify the review.

nliutyi-hs commented 1 year ago

@motnyk PR is updated, please take a look once you'll be able to.