linen.dev
linen.dev copied to clipboard
Links to messages in threads are not translated
When linking to a slack message, links are like so:
https://kotlinlang.slack.com/archives/C0B8W32VA/p1689774618941099?thread_ts=1689772941.512519&cid=C0B8W32VA
When linking to the top-level message in a discussion, linen.dev knows how to translate and it's therefore possible to stay in the linen.dev UI without having to login to slack but the same is not true when linking inside threads.
For an example, this linen.dev link: https://slack-chats.kotlinlang.org/t/13226465/i-love-that-i-can-point-anyone-to-this-slack-using-http-line#9076a051-0d58-4ee8-8d0a-4b5dfb31dfe8 contains a link to a thread which opens the KotlinLang slack (this one) instead of staying on https://slack-chats.kotlinlang.org/
hey @martinbonnin, thanks for the detailed use case, we'll try to handle it :). We weren't sure how much this feature is being used so we have a very basic version right now.
Context
Here's the corresponding client code and backend code.
Right now we're doing the url calculation when the link is clicked because:
- custom domain can change, so we can't simply replace the text
- we need to do a backend call, so we cannot do it server-side during rendering due to performance reasons
We have a better idea in mind, where we have a dedicated syntax for such urls and we do the link transformation either while syncing/editing/creating the message, but that's a bit more work and we're a small team. Other complication is that while in slack, you might want to keep the slack link.