parse-community / parse-server-push-adapter

A push notification adapter for Parse Server
https://parseplatform.org
MIT License
85 stars 100 forks source link

make sure we always send apns-expiration as integer number #108

Closed mman closed 6 years ago

mman commented 6 years ago

This pull request quickly addresses the issue where apns-expiration header that gets sent to the Apple Push Notification Service gets wrongly computed into a floating point number thus generating push error 400 BadExpirationDate reported here https://github.com/parse-community/parse-server/issues/4558.

I have tested in production that this fix gets rid of the error and pushes are going through.

I have not tested or reviewed the logic of computing correct push expiration date from push date.

flovilmart commented 6 years ago

@mman, it looks like the tests need an update too!

codecov[bot] commented 6 years ago

Codecov Report

Merging #108 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #108   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           5      5           
  Lines         256    256           
=====================================
  Hits          256    256
Impacted Files Coverage Δ
src/APNS.js 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9ea512f...2b611a5. Read the comment docs.

mman commented 6 years ago

@flovilmart tests updated and passing.

flovilmart commented 6 years ago

Thanks for the PR, i’ll Plan out a release soon