-
-
Notifications
You must be signed in to change notification settings - Fork 489
link_utils: exposing whitelisted protocols to user settings #1467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Fixes zulip#1284. Adding config option to set protocols in the config that are whitelisted to be opened directly. The behaviour is documented in docs\howto\customize-link-protocols.md.
| @@ -0,0 +1,35 @@ | |||
| # Customizing Link Protocols | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be using standard Zulip capitalization throughout (sentence case).
| } | ||
| ``` | ||
|
|
||
| Note: Each protocol should include the trailing colon (:), e.g., "mailto:" instead of "mailto". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Note: Each protocol should include the trailing colon (:), e.g., "mailto:" instead of "mailto". | |
| Note: Each protocol should include the trailing `:`, e.g., "mailto:" instead of "mailto". |
|
@andersk Tagging for your review. |
| const whitelistedProtocols = ConfigUtil.getConfigItem("whitelistedProtocols", [ | ||
| "http:", | ||
| "https:", | ||
| "mailto:", | ||
| "tel:", | ||
| "sip:", | ||
| ]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getConfigItem writes the default value into the config file if it’s missing, so if we ever add new default protocols they’ll never be visible to someone who’s ever launched an old version.
(Was this a bad design decision for getConfigItem? Yes.)
Fixes #1284.
Adding config option to set protocols in the config that are whitelisted to be opened directly.
The behaviour is documented in docs\howto\customize-link-protocols.md.
Supersedes #1401. Keeps the original author same.
Fixes:
Screenshots and screen captures:
Platforms this PR was tested on:
Self-review checklist
(variable names, code reuse, readability, etc.).
Communicate decisions, questions, and potential concerns.
Individual commits are ready for review (see commit discipline).
Completed manual review and testing of the following: