diff --git a/package.json b/package.json index 5eee9499..0854f0ae 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "jasmine": "^2.4.1" }, "dependencies": { - "apn": "^1.7.5", + "apn": "^1.7.8", "node-gcm": "^0.14.0", "npmlog": "^2.0.3", "parse": "^1.8.1" diff --git a/spec/APNS.spec.js b/spec/APNS.spec.js index 8f2dc5a3..69e61f9a 100644 --- a/spec/APNS.spec.js +++ b/spec/APNS.spec.js @@ -67,6 +67,7 @@ describe('APNS', () => { 'badge': 100, 'sound': 'test', 'content-available': 1, + 'mutable-content': 1, 'category': 'INVITE_CATEGORY', 'key': 'value', 'keyAgain': 'valueAgain' @@ -79,6 +80,7 @@ describe('APNS', () => { expect(notification.badge).toEqual(data.badge); expect(notification.sound).toEqual(data.sound); expect(notification.contentAvailable).toEqual(1); + expect(notification.mutableContent).toEqual(1); expect(notification.category).toEqual(data.category); expect(notification.payload).toEqual({ 'key': 'value', diff --git a/src/APNS.js b/src/APNS.js index a5b996fc..fee8b237 100644 --- a/src/APNS.js +++ b/src/APNS.js @@ -236,6 +236,10 @@ function generateNotification(coreData, expirationTime) { let isAvailable = coreData['content-available'] === 1; notification.setContentAvailable(isAvailable); break; + case 'mutable-content': + let isMutable = coreData['mutable-content'] === 1; + notification.setMutableContent(isMutable); + break; case 'category': notification.category = coreData.category; break;