diff --git a/client/startup/startup.js b/client/startup/startup.js index 8279db3373a5..4a92434be37c 100644 --- a/client/startup/startup.js +++ b/client/startup/startup.js @@ -91,17 +91,17 @@ Meteor.startup(function() { } }; - const defaultIdleTimeLimit = 300000; + const defaultIdleTimeLimit = 300; Meteor.subscribe('userData', function() { const user = Meteor.user(); const userLanguage = user && user.language ? user.language : window.defaultUserLanguage(); if (!userHasPreferences(user)) { - UserPresence.awayTime = defaultIdleTimeLimit; + UserPresence.awayTime = defaultIdleTimeLimit * 1000; UserPresence.start(); } else { - UserPresence.awayTime = user.settings.preferences.idleTimeLimit || defaultIdleTimeLimit; + UserPresence.awayTime = (user.settings.preferences.idleTimeLimit || defaultIdleTimeLimit) * 1000; if (user.settings.preferences.hasOwnProperty('enableAutoAway')) { user.settings.preferences.enableAutoAway && UserPresence.start(); diff --git a/packages/rocketchat-i18n/i18n/en.i18n.json b/packages/rocketchat-i18n/i18n/en.i18n.json index 44e8f3fe4791..f2367bfc0d65 100644 --- a/packages/rocketchat-i18n/i18n/en.i18n.json +++ b/packages/rocketchat-i18n/i18n/en.i18n.json @@ -1018,6 +1018,7 @@ "IssueLinks_LinkTemplate_Description": "Template for issue links; %s will be replaced by the issue number.", "It_works": "It works", "Idle_Time_Limit": "Idle Time Limit", + "Idle_Time_Limit_Description": "Period of time until status changes to away. Value needs to be in seconds.", "italics": "italics", "Jitsi_Chrome_Extension": "Chrome Extension Id", "Jitsi_Enable_Channels": "Enable in Channels", diff --git a/packages/rocketchat-lib/server/startup/settings.js b/packages/rocketchat-lib/server/startup/settings.js index 05f9f9f86c4b..fb8b9079508a 100644 --- a/packages/rocketchat-lib/server/startup/settings.js +++ b/packages/rocketchat-lib/server/startup/settings.js @@ -185,7 +185,7 @@ RocketChat.settings.addGroup('Accounts', function() { 'public': true, i18nLabel: 'Enable_Auto_Away' }); - this.add('Accounts_Default_User_Preferences_idleTimeoutLimit', 300000, { + this.add('Accounts_Default_User_Preferences_idleTimeoutLimit', 300, { type: 'int', 'public': true, i18nLabel: 'Idle_Time_Limit' diff --git a/packages/rocketchat-ui-account/client/accountPreferences.html b/packages/rocketchat-ui-account/client/accountPreferences.html index ccdb736a037f..d7d50eedf8d2 100644 --- a/packages/rocketchat-ui-account/client/accountPreferences.html +++ b/packages/rocketchat-ui-account/client/accountPreferences.html @@ -43,6 +43,7 @@