Linkifier with automatic Fallback #11222
Labels
area: markdown (linkifiers)
area: settings (admin/org)
difficult
Issues which we expect to be quite difficult
help wanted
new feature
A proposed new feature for the product
I have a Zulip server that is about a GitHub organization, which has a few repositories. Thus, it would be nice if pasting a commit hash from any of the repositories would automatically link to the correct repo.
The solution I thought of is a Linkifier with fallback: You provide a default (i.e. url for repo1) and when that returns a 404 for a particular input, there is an alternative (url for repo2). This could be chained and Zulip would simply go through each link of the chain and find the first one that doesn't return a 404, and if all are 404, then don't turn it into a link at all.
The extra (milli)seconds this adds until the link is inserted wouldn't really bother since it only has to be performed once when the message is sent, but the extra convenience would be amazing and this could be used for far more than just commit hashes.
Discussion: https://chat.zulip.org/#narrow/stream/2-general/topic/Linkifier.20with.20automatic.20fallback
The text was updated successfully, but these errors were encountered: