zulip-desktop
zulip-desktop copied to clipboard
LinkUtils custom application launcher protocols
Hey,
we are using Zulip and are having a problem for some of our custom launcher we'd link to linkify.
The links are
Would there be an option to ad custom protocol launcher to the settings which will look like:
"protocolLaunchers": {
"
In https://github.com/zulip/zulip-desktop/blob/main/app/common/link-util.ts
The pseudo-code my look like:
...
if (["http:", "https:", "mailto:"].includes(url.protocol)) {
await shell.openExternal(url.href);
} elif (procolLaunchers.includes(url.protocol)) {
executable = procolLaunchers[url.protocol]
command = url.pathname.replace(/^\/+/g, "") + url.search + url.hash
await shell.openExternal(executable + " " + command );
}
else
....
This is an option which might gives the opertunity that users can create clickable links which e.g. open files in applications while keeping the secruity menitoned in: // For security, indirect links to non-whitelisted protocols // through a real web browser via a local HTML file.
As the protocolLaunchers can be configured manually.
What do you think about this, happy to help/cotnribute this with a PR if it's cool :)
Actually i found out that it's way easier to just expose the whitelistedProtocol list, which i will do in a PR!