From 888b0f69a51ae8bc26abcbc008223ae905a4133c Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Mon, 20 Nov 2017 11:45:49 -0200 Subject: [PATCH] Allow APN category field --- lib/common/notifications.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/common/notifications.js b/lib/common/notifications.js index e786a8b..3851022 100644 --- a/lib/common/notifications.js +++ b/lib/common/notifications.js @@ -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), @@ -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)) {