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

Push notification #428

Merged
merged 3 commits into from
Aug 10, 2015
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 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