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

Commit

Permalink
Set timezone publish at the device level to prevent all devices writi…
Browse files Browse the repository at this point in the history
…ng to the timezone field.
  • Loading branch information
Half-Shot committed Sep 9, 2024
1 parent 5ae6e2e commit b12e4cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit b12e4cd

Please sign in to comment.