Skip to content
Snippets Groups Projects
Commit d51a3abb authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Pass all push configs to settings

parent 229ecb16
No related branches found
No related tags found
No related merge requests found
......@@ -30,3 +30,14 @@ Meteor.startup ->
RocketChat.settings.add 'Meta:robots', '', { type: 'string', group: 'Meta' }
RocketChat.settings.add 'Meta:google-site-verification', '', { type: 'string', group: 'Meta' }
RocketChat.settings.add 'Meta:msvalidate.01', '', { type: 'string', group: 'Meta' }
RocketChat.settings.addGroup 'Push'
RocketChat.settings.add 'Push_debug', false, { type: 'boolean', group: 'Push' }
RocketChat.settings.add 'Push_enable', false, { type: 'boolean', group: 'Push' }
RocketChat.settings.add 'Push_production', false, { type: 'boolean', group: 'Push' }
RocketChat.settings.add 'Push_apn_passphrase', '', { type: 'string', group: 'Push' }
RocketChat.settings.add 'Push_apn_key', '', { type: 'string', multiline: true, group: 'Push' }
RocketChat.settings.add 'Push_apn_cert', '', { type: 'string', multiline: true, group: 'Push' }
RocketChat.settings.add 'Push_apn_dev_passphrase', '', { type: 'string', group: 'Push' }
RocketChat.settings.add 'Push_apn_dev_key', '', { type: 'string', multiline: true, group: 'Push' }
RocketChat.settings.add 'Push_apn_dev_cert', '', { type: 'string', multiline: true, group: 'Push' }
......@@ -3,21 +3,22 @@ Meteor.methods
console.log.apply console, arguments
Meteor.startup ->
Push.debug = true
Push.Configure
apn:
passphrase: '***'
keyData: Assets.getText 'certs/PushRocketChatKey.pem'
certData: Assets.getText 'certs/PushRocketChatCert_development.pem'
gateway: 'gateway.sandbox.push.apple.com'
'apn-dev':
passphrase: '***'
keyData: Assets.getText 'certs/PushRocketChatKey.pem'
certData: Assets.getText 'certs/PushRocketChatCert_development.pem'
gateway: 'gateway.sandbox.push.apple.com'
production: false
badge: true
sound: true
alert: true
vibrate: true
Push.debug = RocketChat.settings.get 'Push_debug'
if RocketChat.settings.get('Push_enable') is true
Push.Configure
apn:
passphrase: RocketChat.settings.get 'Push_apn_passphrase'
keyData: RocketChat.settings.get 'Push_apn_key'
certData: RocketChat.settings.get 'Push_apn_cert'
'apn-dev':
passphrase: RocketChat.settings.get 'Push_apn_dev_passphrase'
keyData: RocketChat.settings.get 'Push_apn_dev_key'
certData: RocketChat.settings.get 'Push_apn_dev_cert'
gateway: 'gateway.sandbox.push.apple.com'
production: RocketChat.settings.get 'Push_production'
badge: true
sound: true
alert: true
vibrate: true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment