Skip to content

Commit

Permalink
Merge pull request node-apn#649 from n8han/AllowExpiryZero
Browse files Browse the repository at this point in the history
Support zero-valued (0) `expiry`
  • Loading branch information
acinader authored Aug 28, 2019
2 parents d6273d1 + ac0e163 commit ab48ac1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/notification/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function Notification (payload) {
this.compiled = false;

this.aps = {};
this.expiry = 0;
this.expiry = -1;
this.priority = 10;

if (payload) {
Expand Down Expand Up @@ -46,7 +46,7 @@ Notification.prototype.headers = function headers() {
headers["apns-id"] = this.id;
}

if (this.expiry > 0) {
if (this.expiry >= 0) {
headers["apns-expiration"] = this.expiry;
}

Expand Down

0 comments on commit ab48ac1

Please # to comment.