From a1e35574afe8dbcd07095ef43dc993332458fdf8 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Mon, 18 Sep 2023 13:35:46 -0300 Subject: [PATCH] review --- apps/meteor/server/settings/troubleshoot.ts | 27 ++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/apps/meteor/server/settings/troubleshoot.ts b/apps/meteor/server/settings/troubleshoot.ts index 84dc2cffaba4a..67a1416a32b3f 100644 --- a/apps/meteor/server/settings/troubleshoot.ts +++ b/apps/meteor/server/settings/troubleshoot.ts @@ -1,4 +1,7 @@ +import semver from 'semver'; + import { settingsRegistry } from '../../app/settings/server'; +import { Info } from '../../app/utils/rocketchat.info'; export const createTroubleshootSettings = () => settingsRegistry.addGroup('Troubleshoot', async function () { @@ -19,6 +22,7 @@ export const createTroubleshootSettings = () => i18nDescription: 'Troubleshoot_Disable_Presence_Broadcast_Alert', enableQuery: { _id: 'Presence_broadcast_disabled', value: false }, }); + await this.add('Troubleshoot_Disable_Instance_Broadcast', false, { type: 'boolean', i18nDescription: 'Troubleshoot_Disable_Instance_Broadcast_Alert', @@ -31,13 +35,34 @@ export const createTroubleshootSettings = () => type: 'boolean', i18nDescription: 'Troubleshoot_Disable_Livechat_Activity_Monitor_Alert', }); + await this.add('Troubleshoot_Disable_Data_Exporter_Processor', false, { type: 'boolean', i18nDescription: 'Troubleshoot_Disable_Data_Exporter_Processor_Alert', }); - await this.add('Troubleshoot_Disable_Teams_Mention', false, { type: 'boolean', i18nDescription: 'Troubleshoot_Disable_Teams_Mention_Alert', }); + + if (!semver.lt('7.0.0', Info.version)) { + console.log('remove troubleshoot this setting at next major (7.0.0)'); + } + + // TODO: remove this setting at next major (7.0.0) + await this.add('Troubleshoot_Disable_Statistics_Generator', false, { + type: 'boolean', + i18nDescription: 'Troubleshoot_Disable_Statistics_Generator_Alert', + private: true, + hidden: true, + readonly: true, + }); + // TODO: remove this setting at next major (7.0.0) + await this.add('Troubleshoot_Disable_Workspace_Sync', false, { + type: 'boolean', + i18nDescription: 'Troubleshoot_Disable_Workspace_Sync_Alert', + private: true, + hidden: true, + readonly: true, + }); });