Skip to content

Commit

Permalink
Merge pull request #428 from RocketChat/push-notification
Browse files Browse the repository at this point in the history
Push notification
  • Loading branch information
engelgabriel committed Aug 10, 2015
2 parents de0abc3 + a061c3c commit 0e3e99d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions mobile-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ App.launchScreens({
// Set PhoneGap/Cordova preferences
App.setPreference('HideKeyboardFormAccessoryBar', true);
App.setPreference('StatusBarStyle', 'default');
App.accessRule('*');

// // Pass preferences for a particular PhoneGap/Cordova plugin
// App.configurePlugin('com.phonegap.plugins.facebookconnect', {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions server/lib/cordova.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Meteor.startup ->
Push.debug = RocketChat.settings.get 'Push_debug'

if RocketChat.settings.get('Push_enable') is true
Push.allow
send: (userId, notification) ->
return Meteor.users.findOne({_id: userId})?.admin is true

Push.Configure
apn:
passphrase: RocketChat.settings.get 'Push_apn_passphrase'
Expand Down

0 comments on commit 0e3e99d

Please sign in to comment.