Some bots that are used at my employer use the legacy attachments formatting instead of blocks so I hacked this in.
This should probably be a separate function and could be refactored to reduce some nesting, but this is what I'm running right now.
The current version is missing support for the following items because I haven't got around to handle images inside messages but it shouldn't be too hard to implement by refactoring renderImageBlock a bit:
author_icon
footer_icon
image_url
thumb_url
Not sure if this warrants a draft to wait until images are handled or if this can be added as is (after review).
forgot to mention that the code doesn't take the mrkdwn_in field into account, because Slack does parse some stuff like custom emoji even though the fields aren't mentioned in mrkdwn_in
As documented at https://api.slack.com/reference/messaging/attachments
Some bots that are used at my employer use the legacy attachments formatting instead of blocks so I hacked this in.
This should probably be a separate function and could be refactored to reduce some nesting, but this is what I'm running right now.
The current version is missing support for the following items because I haven't got around to handle images inside messages but it shouldn't be too hard to implement by refactoring
renderImageBlock
a bit:Not sure if this warrants a draft to wait until images are handled or if this can be added as is (after review).