err-backend-slackv3
err-backend-slackv3 copied to clipboard
Slack: send_card() does not support markdown
Using send_card() with the Slack backend does not render the given string to markdown prior to passing it to the underlying API.
For example:
self.send_card(
in_reply_to=message,
body="`some text`",
)
Results in the sent card actually containing
`some text`
rather than
in the usual Slack inline code style.
This applies to all of the markdown syntax that Slack supports.
The same issue also exists when using the fields argument of send_card().
Slack states that markdown is disabled by default for attachments (https://api.slack.com/docs/message-formatting). It would be great to have this implemented to enable markdown for attachments.
I would also enjoy this feature 👍
Supporting this, it'd be great to have proper markdown support :+1:
I support this too 👍
@sheluchin if you have some time, could you check out errbotio/errbot#1284 and see if it addresses your request?
@andrewthetechie That addresses most of the problem. I did create this ticket specifically because I was trying to put some markdown in the card.body, but using a field instead of the body would be an acceptable workaround for my use case.
I understand the difficulty of applying your fix to the card.body. I personally don't think it's worth the effort, because using a field is a good enough workaround.
Unless anyone feels strongly about it, I'll leave this issue open since it's not completely resolved. Maybe it will help someone figure things out at some point in the future.
Thanks very much for the fix!
Related ticket too. https://github.com/errbotio/err-backend-slackv3/issues/28