Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support headers in data field #148

Merged
merged 2 commits into from
Oct 26, 2019
Merged

Support headers in data field #148

merged 2 commits into from
Oct 26, 2019

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Oct 19, 2019

https://docs.parseplatform.org/js/guide/#customizing-your-notifications

The docs says that the headers should be in the data field

@dplewis
Copy link
Member Author

dplewis commented Oct 21, 2019

@acinader Should we support this or fast fail and update the docs?

@acinader
Copy link
Contributor

i'm not sure what you're referring to in the docs. is there an issue associated with this. just not enough info for me to understand the issue.

@acinader
Copy link
Contributor

Ok, now I see that this is for parse-community/parse-server#6106

If I've got it right, I think we should fast fail and update the docs.

@codecov
Copy link

codecov bot commented Oct 24, 2019

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #148   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           5      5           
  Lines         267    267           
=====================================
  Hits          267    267
Impacted Files Coverage Δ
src/APNS.js 100% <100%> (ø) ⬆️

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 08a9140...7edd649. Read the comment docs.

@dplewis
Copy link
Member Author

dplewis commented Oct 26, 2019

@acinader @davimacedo I went ahead and allowed for both.

Parse.Push.send({
  channels: [ "Mets" ],
  push_type: ... // if used with have precedence over data field
  data: {
    alert: "The Mets scored! The game is now tied 1-1.",
    badge: "Increment",
    sound: "cheering.caf",
    title: "Mets Score!",
    push_type: ... // most users are familiar with the data field. changing it would cause confusion and   might be a breaking change for existing headers like priority
  }
})

@dplewis dplewis changed the title Failing test headers in data field Support headers in data field Oct 26, 2019
@dplewis dplewis merged commit c9a1fc6 into master Oct 26, 2019
@dplewis dplewis deleted the failing-test branch October 26, 2019 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants