diff --git a/packages/rocketchat-i18n/i18n/en.i18n.json b/packages/rocketchat-i18n/i18n/en.i18n.json index 040f6613e99..b1958c56c42 100644 --- a/packages/rocketchat-i18n/i18n/en.i18n.json +++ b/packages/rocketchat-i18n/i18n/en.i18n.json @@ -2029,6 +2029,7 @@ "Public_Community": "Public Community", "Public_Relations": "Public Relations", "Push": "Push", + "Push_Setting_Requires_Restart_Alert": "Changing this value requires restarting Rocket.Chat.", "Push_apn_cert": "APN Cert", "Push_apn_dev_cert": "APN Dev Cert", "Push_apn_dev_key": "APN Dev Key", diff --git a/packages/rocketchat-lib/server/startup/settings.js b/packages/rocketchat-lib/server/startup/settings.js index 02139dc115b..44ede8b1dd1 100644 --- a/packages/rocketchat-lib/server/startup/settings.js +++ b/packages/rocketchat-lib/server/startup/settings.js @@ -1470,11 +1470,13 @@ RocketChat.settings.addGroup('Meta', function() { RocketChat.settings.addGroup('Push', function() { this.add('Push_enable', true, { type: 'boolean', - 'public': true + 'public': true, + alert: 'Push_Setting_Requires_Restart_Alert' }); this.add('Push_debug', false, { type: 'boolean', 'public': true, + alert: 'Push_Setting_Requires_Restart_Alert', enableQuery: { _id: 'Push_enable', value: true @@ -1482,6 +1484,7 @@ RocketChat.settings.addGroup('Push', function() { }); this.add('Push_enable_gateway', true, { type: 'boolean', + alert: 'Push_Setting_Requires_Restart_Alert', enableQuery: { _id: 'Push_enable', value: true @@ -1489,6 +1492,7 @@ RocketChat.settings.addGroup('Push', function() { }); this.add('Push_gateway', 'https://gateway.rocket.chat', { type: 'string', + alert: 'Push_Setting_Requires_Restart_Alert', enableQuery: [ { _id: 'Push_enable', @@ -1502,6 +1506,7 @@ RocketChat.settings.addGroup('Push', function() { this.add('Push_production', true, { type: 'boolean', 'public': true, + alert: 'Push_Setting_Requires_Restart_Alert', enableQuery: [ { _id: 'Push_enable', diff --git a/server/lib/cordova.js b/server/lib/cordova.js index 3221b9145ce..c5532caffce 100644 --- a/server/lib/cordova.js +++ b/server/lib/cordova.js @@ -208,10 +208,9 @@ function configurePush() { }); }; } - return Push.enabled = true; + + Push.enabled = true; } } -Meteor.startup(function() { - return configurePush(); -}); +Meteor.startup(configurePush);