The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/server/lib/cordova.coffee

34 lines
1.0 KiB

Meteor.methods
log: ->
console.log.apply console, arguments
Meteor.startup ->
Push.debug = RocketChat.settings.get 'Push_debug'
if RocketChat.settings.get('Push_enable') is true
Push.enabled = true
Push.allow
send: (userId, notification) ->
return RocketChat.authz.hasRole(userId, 'admin')
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'
gcm:
apiKey: RocketChat.settings.get 'Push_gcm_api_key'
projectNumber: RocketChat.settings.get 'Push_gcm_project_number'
production: RocketChat.settings.get 'Push_production'
badge: true
sound: true
alert: true
vibrate: true
sendInterval: 1000
sendBatchSize: 10