Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Check for feature support for extended profiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot committed Sep 8, 2024
1 parent 6989162 commit 34d3176
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,7 @@
"element_call_video_rooms": "Element Call video rooms",
"experimental_description": "Feeling experimental? Try out our latest ideas in development. These features are not finalised; they may be unstable, may change, or may be dropped altogether. <a>Learn more</a>.",
"experimental_section": "Early previews",
"extended_profiles_msc_support": "Requires your server to support MSC4133",
"feature_disable_call_per_sender_encryption": "Disable per-sender encryption for Element Call",
"feature_wysiwyg_composer_description": "Use rich text instead of Markdown in the message composer.",
"group_calls": "New group call experience",
Expand Down
9 changes: 8 additions & 1 deletion src/settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import ServerSupportUnstableFeatureController from "./controllers/ServerSupportU
import { WatchManager } from "./WatchManager";
import { CustomTheme } from "../theme";
import AnalyticsController from "./controllers/AnalyticsController";

Check failure on line 45 in src/settings/Settings.tsx

View workflow job for this annotation

GitHub Actions / ESLint

There should be at least one empty line between import groups
import { UNSTABLE_MSC4133_EXTENDED_PROFILES } from "matrix-js-sdk/src/client"

Check failure on line 46 in src/settings/Settings.tsx

View workflow job for this annotation

GitHub Actions / Typescript Syntax Check

Module '"matrix-js-sdk/src/client"' has no exported member 'UNSTABLE_MSC4133_EXTENDED_PROFILES'.

export const defaultWatchManager = new WatchManager();

Expand Down Expand Up @@ -654,11 +655,17 @@ export const SETTINGS: { [setting: string]: ISetting } = {
displayName: _td("settings|preferences|user_timezone"),
default: "",
},
// TODO: How to make this visible based on server feature levels?
"userTimezonePublish": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td("settings|preferences|publish_timezone"),
default: false,
controller: new ServerSupportUnstableFeatureController(
"userTimezonePublish",
defaultWatchManager,
[[UNSTABLE_MSC4133_EXTENDED_PROFILES]],
undefined,
_td("labs|extended_profiles_msc_support"),
),
},
"autoplayGifs": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
Expand Down

0 comments on commit 34d3176

Please sign in to comment.