Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/raix/push
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/raix/push:
  Allow APN category field
  • Loading branch information
Morten Henriksen committed Nov 23, 2017
2 parents 1b75a69 + 803a2c8 commit b3e72e4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/common/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ var _validateDocument = function(notification) {
text: Match.Optional(String),
badge: Match.Optional(Match.Integer),
sound: Match.Optional(String),
notId: Match.Optional(Match.Integer)
notId: Match.Optional(Match.Integer),
category: Match.Optional(String)
}),
gcm: Match.Optional({
from: Match.Optional(String),
Expand Down Expand Up @@ -77,7 +78,7 @@ Push.send = function(options) {
_.extend(notification, _.pick(options, 'payload', 'badge', 'sound', 'notId', 'delayUntil'));

if (Match.test(options.apn, Object)) {
notification.apn = _.pick(options.apn, 'from', 'title', 'text', 'badge', 'sound', 'notId');
notification.apn = _.pick(options.apn, 'from', 'title', 'text', 'badge', 'sound', 'notId', 'category');
}

if (Match.test(options.gcm, Object)) {
Expand Down

0 comments on commit b3e72e4

Please sign in to comment.