err-backend-slackv3 icon indicating copy to clipboard operation
err-backend-slackv3 copied to clipboard

Slack: send_card() does not support markdown

Open sheluchin opened this issue 9 years ago • 7 comments

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 image 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().

sheluchin avatar Aug 24 '16 21:08 sheluchin

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.

the0rem avatar Sep 23 '16 02:09 the0rem

I would also enjoy this feature 👍

ghost avatar Dec 15 '16 07:12 ghost

Supporting this, it'd be great to have proper markdown support :+1:

vdemonchy avatar Jan 16 '17 16:01 vdemonchy

I support this too 👍

DasFranck avatar Apr 12 '17 15:04 DasFranck

@sheluchin if you have some time, could you check out errbotio/errbot#1284 and see if it addresses your request?

andrewthetechie avatar Jan 09 '19 23:01 andrewthetechie

@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!

sheluchin avatar Jan 10 '19 02:01 sheluchin

Related ticket too. https://github.com/errbotio/err-backend-slackv3/issues/28

sijis avatar Jul 23 '21 06:07 sijis