diff --git a/apps/meteor/app/lib/server/startup/settings.ts b/apps/meteor/app/lib/server/startup/settings.ts index 364c31741a8c..555536319b33 100644 --- a/apps/meteor/app/lib/server/startup/settings.ts +++ b/apps/meteor/app/lib/server/startup/settings.ts @@ -3271,7 +3271,7 @@ settingsRegistry.addGroup('Troubleshoot', function () { this.add('Presence_broadcast_disabled', false, { type: 'boolean', public: true, - blocked: true, + readonly: true, }); this.add('Troubleshoot_Disable_Presence_Broadcast', false, { diff --git a/apps/meteor/client/views/admin/settings/inputs/BooleanSettingInput.tsx b/apps/meteor/client/views/admin/settings/inputs/BooleanSettingInput.tsx index 1a8728ac79c6..e7799473f752 100644 --- a/apps/meteor/client/views/admin/settings/inputs/BooleanSettingInput.tsx +++ b/apps/meteor/client/views/admin/settings/inputs/BooleanSettingInput.tsx @@ -36,8 +36,7 @@ function BooleanSettingInput({ id={_id} value='true' checked={value === true} - disabled={disabled} - readOnly={readonly} + disabled={disabled || readonly} onChange={handleChange} /> diff --git a/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json b/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json index 4dbffde6b8b9..9052c851e240 100644 --- a/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json +++ b/apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json @@ -5583,7 +5583,7 @@ "Active_connections": "Active connections", "Presence_service": "Presence service", "Presence_broadcast_disabled": "Presence broadcast disabled internally", - "Presence_broadcast_disabled_Description": "Shows if the presence broadcast has been disabled internally. This will happen if you don't have an Enterprise License and has more than 200 concurrent connections.", + "Presence_broadcast_disabled_Description": "This shows if the presence broadcast has been disabled automatically. This can happen if you don't have an Enterprise License and have more than 200 concurrent connections.", "New_custom_status": "New custom status", "Service_disabled": "The service is now disabled", "Service_disabled_description": "You can't reenable it again until there's less than 200 active connections at the same time", diff --git a/ee/packages/presence/src/Presence.ts b/ee/packages/presence/src/Presence.ts index 144f0b1395df..9bb29b011c26 100755 --- a/ee/packages/presence/src/Presence.ts +++ b/ee/packages/presence/src/Presence.ts @@ -31,8 +31,8 @@ export class Presence extends ServiceClass implements IPresence { return; } - // check total connections if there is no license - if (!this.hasLicense && diff?.hasOwnProperty('extraInformation.conns')) { + // always store the number of connections per instance so we can show correct in the UI + if (diff?.hasOwnProperty('extraInformation.conns')) { this.connsPerInstance.set(id, diff['extraInformation.conns']); this.validateAvailability(); @@ -73,7 +73,7 @@ export class Presence extends ServiceClass implements IPresence { clearTimeout(this.lostConTimeout); } - toggleBroadcast(enabled: boolean): void { + async toggleBroadcast(enabled: boolean): Promise { if (!this.hasLicense && this.getTotalConnections() > MAX_CONNECTIONS) { throw new Error('Cannot enable broadcast when there are more than 200 connections'); } @@ -81,7 +81,7 @@ export class Presence extends ServiceClass implements IPresence { // update the setting only to turn it on, because it may have been disabled via the troubleshooting setting, which doesn't affect the setting if (enabled) { - Settings.updateValueById('Presence_broadcast_disabled', false); + await Settings.updateValueById('Presence_broadcast_disabled', false); } }