Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 6 additions & 1 deletion packages/rocketchat-lib/server/startup/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1470,25 +1470,29 @@ 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
}
});
this.add('Push_enable_gateway', true, {
type: 'boolean',
alert: 'Push_Setting_Requires_Restart_Alert',
enableQuery: {
_id: 'Push_enable',
value: true
}
});
this.add('Push_gateway', 'https://gateway.rocket.chat', {
type: 'string',
alert: 'Push_Setting_Requires_Restart_Alert',
enableQuery: [
{
_id: 'Push_enable',
Expand All @@ -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',
Expand Down
7 changes: 3 additions & 4 deletions server/lib/cordova.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,9 @@ function configurePush() {
});
};
}
return Push.enabled = true;

Push.enabled = true;
}
}

Meteor.startup(function() {
return configurePush();
});
Meteor.startup(configurePush);