codeforamerica / glossary-bot

A Glossary bot for Slack
MIT License
116 stars 45 forks source link

links in definitions not clickable in shh output #28

Closed mathowie closed 8 years ago

mathowie commented 9 years ago

Some of our glossary definitions have links to view illustrations or jump to a web we're explaining an acronym for. So say if LMGTFY = Let Me Google That For You letmegooglethatforyou.com

a /gloss LMGTFY would display the definition and the .com at the end would be clickable and take you there.

a /gloss shh LMGTFY shows a italicized grayed-out slackbot response where it doesn't auto-link things.

Is this more of a Slack bug or a Glossbot bug? There's no way to insert clickable links in a Slackbot response is there?

tmaybe commented 9 years ago

@mathowie It's a Slack bug, or at least an inconsistency. I reported it in March, and the person I corresponded with confirmed with the integrations team that URL detection is inconsistent between responses to slash commands (what slackbot says) and the text in an incoming webhook (what gloss bot says).

I'm reluctant to roll my own URL detection for this purpose because it's a non-trivial operation and I'd inevitably miss URLs that Slack catches or mis-id something as a URL that Slack passes on, etc.

In the meantime, if you wrap a URL in angle brackets when you're defining the term, like <http://example.com/>, it'll show up as clickable in the slackbot message.