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

Commit b12e4cd

Browse files
committed
Set timezone publish at the device level to prevent all devices writing to the timezone field.
1 parent 5ae6e2e commit b12e4cd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/components/views/settings/tabs/user/PreferencesUserSettingsTab.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
143143
"MessageComposerInput.insertTrailingColon",
144144
];
145145

146-
private static TIME_SETTINGS = ["showTwelveHourTimestamps", "alwaysShowTimestamps", "userTimezonePublish"];
146+
private static TIME_SETTINGS = ["showTwelveHourTimestamps", "alwaysShowTimestamps"];
147147

148148
private static CODE_BLOCKS_SETTINGS = [
149149
"enableSyntaxHighlightLanguageDetection",
@@ -310,6 +310,7 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
310310
</div>
311311

312312
{this.renderGroup(PreferencesUserSettingsTab.TIME_SETTINGS)}
313+
<SettingsFlag name="userTimezonePublish" level={SettingLevel.DEVICE} />
313314
</SettingsSubsection>
314315

315316
<SettingsSubsection

src/settings/Settings.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,8 @@ export const SETTINGS: { [setting: string]: ISetting } = {
656656
default: "",
657657
},
658658
"userTimezonePublish": {
659-
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
659+
// This is per-device so you can avoid having devices overwrite each other.
660+
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
660661
displayName: _td("settings|preferences|publish_timezone"),
661662
default: false,
662663
controller: new ServerSupportUnstableFeatureController(

0 commit comments

Comments
 (0)