vercel-labs / slacker

A bot that notifies you on Slack whenever your company/product is mentioned on Hacker News. Powered by Vercel Functions & Upstash.
https://slacker.run
346 stars 42 forks source link

Use block kit instead of two step flow? #20

Closed marcosnils closed 1 year ago

marcosnils commented 1 year ago

IIUC the main reason to do a two step flow (post link and then unfurl) is so the link gets displayed "nicely" in slack.

Wouldn't using block kit (https://api.slack.com/block-kit) allow making a single postMessage call and style the Slack message in a same way?

That would simplify things quite a bit.

steven-tey commented 1 year ago

Sorry for the late reply here @marcosnils! I tried that in the beginning but that would send a message as a block – instead of having a nice link unfurl attachment like how Twitter, GitHub, and other link previews work on Slack. Furthermore, that won't work for arbitrary Hacker News Links that are posted on Slack.