diff --git a/packages/rocketchat-lib/server/models/Users.js b/packages/rocketchat-lib/server/models/Users.js index aec91942c376..4d2e523821d6 100644 --- a/packages/rocketchat-lib/server/models/Users.js +++ b/packages/rocketchat-lib/server/models/Users.js @@ -465,7 +465,7 @@ class ModelUsers extends RocketChat.models._Base { const update = { $set: settings, }; - if (![1, 2].includes(parseInt(settings.preferences.clockMode))) { + if (parseInt(preferences.clockMode) === 0) { delete update.$set['settings.preferences.clockMode']; update.$unset = { 'settings.preferences.clockMode': 1 }; }