@parse/node-apn
Advanced tools
Comparing version 6.0.2 to 6.1.0
@@ -0,1 +1,8 @@ | ||
# [6.1.0](https://github.com/parse-community/node-apn/compare/6.0.2...6.1.0) (2024-09-16) | ||
### Features | ||
* Add `dismissal-date` property to Live Activity notifications ([#152](https://github.com/parse-community/node-apn/issues/152)) ([d863f2e](https://github.com/parse-community/node-apn/commit/d863f2e6ce2a58ee92371d69ad8966dd9927e90f)) | ||
## [6.0.2](https://github.com/parse-community/node-apn/compare/6.0.1...6.0.2) (2024-09-10) | ||
@@ -2,0 +9,0 @@ |
@@ -116,2 +116,8 @@ module.exports = { | ||
set dismissalDate(value) { | ||
if (typeof value === 'number' || value === undefined) { | ||
this.aps['dismissal-date'] = value; | ||
} | ||
}, | ||
set contentAvailable(value) { | ||
@@ -118,0 +124,0 @@ if (value === true || value === 1) { |
@@ -57,2 +57,3 @@ /** | ||
'contentState', | ||
'dismissalDate' | ||
].forEach(propName => { | ||
@@ -59,0 +60,0 @@ const methodName = 'set' + propName[0].toUpperCase() + propName.slice(1); |
{ | ||
"name": "@parse/node-apn", | ||
"description": "An interface to the Apple Push Notification service for Node.js", | ||
"version": "6.0.2", | ||
"version": "6.1.0", | ||
"author": "Parse Platform, Andrew Naylor <argon@mkbot.net>", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -861,2 +861,28 @@ const Notification = require('../../lib/notification'); | ||
describe('dismissal-date', function () { | ||
it('defaults to undefined', function () { | ||
expect(compiledOutput()).to.not.have.nested.property('aps.dismissal-date'); | ||
}); | ||
it('can be set to a number', function () { | ||
note.dismissalDate = 123456; | ||
expect(compiledOutput()).to.have.nested.property('aps.dismissal-date', 123456); | ||
}); | ||
it('can be set to undefined', function () { | ||
note.dismissalDate = 123456; | ||
note.dismissalDate = undefined; | ||
expect(compiledOutput()).to.not.have.nested.property('aps.dismissal-date'); | ||
}); | ||
describe('setDismissalDate', function () { | ||
it('is chainable', function () { | ||
expect(note.setDismissalDate(123456)).to.equal(note); | ||
expect(compiledOutput()).to.have.nested.property('aps.dismissal-date', 123456); | ||
}); | ||
}); | ||
}); | ||
describe('timestamp', function () { | ||
@@ -863,0 +889,0 @@ it('defaults to undefined', function () { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
398742
6219