-
-
Notifications
You must be signed in to change notification settings - Fork 409
Client Feature improvements #3197
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,45 @@ | ||
| {# Client macros for the Matrix.org website Features Schema (all boolean values): | ||
| - e2ee: End-to-end encryption support | ||
| - spaces: Matrix Spaces support | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what counts as "support" though?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unclear. This existed before with unclear definition :/ |
||
| - voip_1to1: 1-to-1 voice/video calls | ||
| - voip_jitsi: Jitsi-based group calls | ||
| - threads: Threading support | ||
| - sso: Legacy Single Sign-On (m.login.sso) | ||
| - oidc: Native OIDC/OAuth 2.0 authentication (Matrix Authentication Service, added in spec 1.15) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure about namedropping MAS since that's just an implementation. link to spec if clarification necessary?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well it is the one thing most people seem to know it by. I agree with linking to spec though. But I feel like most people will still confuse it with the legacy sso :/ I guess we will find out. |
||
| - multi_account: Multiple account support | ||
| - multi_language: Internationalization/localization support | ||
| #} | ||
|
|
||
| {# List of valid feature names for validation #} | ||
| {% set VALID_FEATURES = [ | ||
| "e2ee", | ||
| "spaces", | ||
| "voip_1to1", | ||
| "voip_jitsi", | ||
| "threads", | ||
| "sso", | ||
| "oidc", | ||
| "multi_account", | ||
| "multi_language" | ||
| ] %} | ||
|
|
||
| {# Human-readable labels for features #} | ||
| {% macro feature_label(feature_name) %} | ||
| {% if feature_name == "e2ee" %} | ||
| E2EE | ||
| {% elif feature_name == "sso" %} | ||
| Legacy SSO | ||
| {% elif feature_name == "oidc" %} | ||
| OIDC | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TIL its named OAuth2 in spec... Yet everyone talking about it calls oidc...
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "OIDC native" turned out to marketing speech (admittedly it rolls off the tongue a bit easier, e.g. https://areweoidcyet.com/), but concessions have been made in the meantime. |
||
| {% elif feature_name == "voip_1to1" %} | ||
| VoIP (1:1) | ||
| {% elif feature_name == "voip_jitsi" %} | ||
| VoIP (Jitsi) | ||
| {% else %} | ||
| {{feature_name | replace(from="_", to=" ") | title }} | ||
| {% endif %} | ||
| {% endmacro %} | ||
|
|
||
| {% macro classes(client) %} | ||
| {% if client.packages.apple_app_store.app_id and client.packages.apple_app_store.org %} | ||
| platform-ios | ||
|
|
@@ -33,14 +75,24 @@ | |
| {% macro features(features, supported) %} | ||
| {% set_global matching = 0 %} | ||
| {% for feature_name, supports in features %} | ||
| {% if supports == supported %} | ||
| {% set_global matching = matching + 1 %} | ||
| {% if feature_name == "e2ee" or feature_name == "sso" %} | ||
| <p>{{ feature_name | upper }}</p> | ||
| {% else %} | ||
| <p>{{ feature_name | replace(from="_", to=" ") | title }}</p> | ||
| {% endif %} | ||
| {% endif %} | ||
| {# Validate feature value is boolean before processing #} | ||
| {% if supports is same_as(true) or supports is same_as(false) %} | ||
| {% if supports == supported %} | ||
| {% set_global matching = matching + 1 %} | ||
| {# Check if feature is in our known list #} | ||
| {% set_global feature_is_valid = false %} | ||
| {% for valid in VALID_FEATURES %} | ||
| {% if valid == feature_name %} | ||
| {% set_global feature_is_valid = true %} | ||
| {% endif %} | ||
| {%endfor %} | ||
| {% if feature_is_valid %} | ||
| <p>{{ self::feature_label(feature_name=feature_name) | trim }}</p> | ||
| {% else %} | ||
| {{ throw(message="Invalid feature found. Make sure it is within the VALID_FEATURES table!") }} | ||
| {% endif %} | ||
| {% endif %} | ||
| {% endif %} | ||
| {% endfor %} | ||
| {% if matching == 0 %}None!{% endif %} | ||
| {% endmacro %} | ||
|
|
||
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.
#2966