1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-09-03 07:02:05 +03:00

Set timezone publish at the device level to prevent all devices writing to the timezone field.

This commit is contained in:
Half-Shot
2024-09-09 17:49:38 +01:00
parent 5ae6e2e0e1
commit b12e4cd5aa
2 changed files with 4 additions and 2 deletions

View File

@@ -143,7 +143,7 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
"MessageComposerInput.insertTrailingColon",
];
private static TIME_SETTINGS = ["showTwelveHourTimestamps", "alwaysShowTimestamps", "userTimezonePublish"];
private static TIME_SETTINGS = ["showTwelveHourTimestamps", "alwaysShowTimestamps"];
private static CODE_BLOCKS_SETTINGS = [
"enableSyntaxHighlightLanguageDetection",
@@ -310,6 +310,7 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
</div>
{this.renderGroup(PreferencesUserSettingsTab.TIME_SETTINGS)}
<SettingsFlag name="userTimezonePublish" level={SettingLevel.DEVICE} />
</SettingsSubsection>
<SettingsSubsection

View File

@@ -656,7 +656,8 @@ export const SETTINGS: { [setting: string]: ISetting } = {
default: "",
},
"userTimezonePublish": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
// This is per-device so you can avoid having devices overwrite each other.
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
displayName: _td("settings|preferences|publish_timezone"),
default: false,
controller: new ServerSupportUnstableFeatureController(