prjseal / SlackBotMessages

A .NET library to enable you to send bot messages in slack
MIT License
55 stars 19 forks source link

Support for Blocks #14

Open michaellegner opened 4 years ago

michaellegner commented 4 years ago

How about support for Blocks?

This is the description for Attachments in the Slack API: "An array of legacy secondary attachments. We recommend you use blocks instead."

First level of support could be just sending the JSON string to the API? That is, adding Blocks to the Message.

https://api.slack.com/block-kit/building

michaellegner commented 4 years ago

I just tried it on a clone of the repo and by just adding a string property Blocks I managed to send a nice looking message. Perhaps building the json string is another tool's responsibility. Here I just need the Blocks to be serialized with the rest of the message.

prjseal commented 4 years ago

Thanks for letting me know about the new blocks feature. I’ll add it to the project in the coming weeks.