[IMPROVE] Warn about push settings that need server restart (#11784)

pull/11800/head
Tasso Evangelista 7 years ago committed by Guilherme Gazzo
parent 1148d6c402
commit 086f19a1f1
  1. 1
      packages/rocketchat-i18n/i18n/en.i18n.json
  2. 7
      packages/rocketchat-lib/server/startup/settings.js
  3. 7
      server/lib/cordova.js

@ -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",

@ -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',

@ -208,10 +208,9 @@ function configurePush() {
});
};
}
return Push.enabled = true;
Push.enabled = true;
}
}
Meteor.startup(function() {
return configurePush();
});
Meteor.startup(configurePush);

Loading…
Cancel
Save