@parse/node-apn
Advanced tools
Comparing version 5.2.2 to 5.2.3
@@ -0,1 +1,8 @@ | ||
## [5.2.3](https://github.com/parse-community/node-apn/compare/5.2.2...5.2.3) (2023-07-21) | ||
### Bug Fixes | ||
* Incorrect field name `event` instead of `events` in Live Activity push notification payload ([#133](https://github.com/parse-community/node-apn/issues/133)) ([a25c835](https://github.com/parse-community/node-apn/commit/a25c835d220a6d37101eeaedaec78e1fb0028696)) | ||
## [5.2.2](https://github.com/parse-community/node-apn/compare/5.2.1...5.2.2) (2023-07-20) | ||
@@ -2,0 +9,0 @@ |
@@ -104,5 +104,5 @@ module.exports = { | ||
set event(value) { | ||
set events(value) { | ||
if (typeof value === 'string' || value === undefined) { | ||
this.aps.event = value; | ||
this.aps.events = value; | ||
} | ||
@@ -109,0 +109,0 @@ }, |
@@ -55,3 +55,3 @@ /** | ||
'staleDate', | ||
'event', | ||
'events', | ||
'contentState', | ||
@@ -58,0 +58,0 @@ ].forEach(propName => { |
{ | ||
"name": "@parse/node-apn", | ||
"description": "An interface to the Apple Push Notification service for Node.js", | ||
"version": "5.2.2", | ||
"version": "5.2.3", | ||
"author": "Parse Platform, Andrew Naylor <argon@mkbot.net>", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -166,3 +166,3 @@ # Node APN <!-- omit in toc --> | ||
note.staleDate = Math.floor(Date.now() / 1000) + (8 * 3600); // Expires 8 hour from now. | ||
note.event = "update" | ||
note.events = "update" | ||
note.contentState = {} | ||
@@ -183,3 +183,3 @@ ``` | ||
```json | ||
{"messageFrom":"John Appleseed","aps":{"badge":3,"sound":"ping.aiff","alert":"\uD83D\uDCE7 \u2709 You have a new message", "relevance-score":75,"timestamp":1683129662,"stale-date":1683216062,"event":"update","content-state":{}}} | ||
{"messageFrom":"John Appleseed","aps":{"badge":3,"sound":"ping.aiff","alert":"\uD83D\uDCE7 \u2709 You have a new message", "relevance-score":75,"timestamp":1683129662,"stale-date":1683216062,"events":"update","content-state":{}}} | ||
``` | ||
@@ -186,0 +186,0 @@ |
@@ -835,24 +835,24 @@ const Notification = require('../../lib/notification'); | ||
describe('event', function () { | ||
describe('events', function () { | ||
it('defaults to undefined', function () { | ||
expect(compiledOutput()).to.not.have.nested.property('aps.event'); | ||
expect(compiledOutput()).to.not.have.nested.property('aps.events'); | ||
}); | ||
it('can be set to a string', function () { | ||
note.event = 'the-event'; | ||
note.events = 'the-event'; | ||
expect(compiledOutput()).to.have.nested.property('aps.event', 'the-event'); | ||
expect(compiledOutput()).to.have.nested.property('aps.events', 'the-event'); | ||
}); | ||
it('can be set to undefined', function () { | ||
note.event = 'the-event'; | ||
note.event = undefined; | ||
note.events = 'the-event'; | ||
note.events = undefined; | ||
expect(compiledOutput()).to.not.have.nested.property('aps.event'); | ||
expect(compiledOutput()).to.not.have.nested.property('aps.events'); | ||
}); | ||
describe('setEvent', function () { | ||
describe('setEvents', function () { | ||
it('is chainable', function () { | ||
expect(note.setEvent('the-event')).to.equal(note); | ||
expect(compiledOutput()).to.have.nested.property('aps.event', 'the-event'); | ||
expect(note.setEvents('the-event')).to.equal(note); | ||
expect(compiledOutput()).to.have.nested.property('aps.events', 'the-event'); | ||
}); | ||
@@ -859,0 +859,0 @@ }); |
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
396195