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

Push notification - bage increment - changed to uppercase "I"? #1223

Closed
goggelj opened this issue Mar 28, 2016 · 8 comments · Fixed by #1248
Closed

Push notification - bage increment - changed to uppercase "I"? #1223

goggelj opened this issue Mar 28, 2016 · 8 comments · Fixed by #1248

Comments

@goggelj
Copy link

goggelj commented Mar 28, 2016

In the current parse.com, to increment a badge one uses:

...
"badge: "increment"
...

Just tested with curl and it seems that in the parse-server, to increment badge, I need to send 'Increment' with a capital 'I':

...
"badge: "Increment"
...

A bug/oversight or on purpose? Suggest, at the very least for docs/gist/readme to be updated.

For implementation related questions or technical support, please refer to the Stack Overflow and Server Fault communities.

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

Environment Setup

Standard heroku deployment (not via button)

Steps to reproduce

curl -X POST
-H "X-Parse-Application-Id: app-id"
-H "X-Parse-Master-Key: master-key"
-H "Content-Type: application/json"
-d '{
"where": {},
"data": {
"alert": "New Alert",
"badge": "increment"
}
}'
https://app.url/parse/push

Logs/Trace

2016-03-28T11:11:20.026577+00:00 app[web.1]: Uncaught internal server error. Invalid value for badge, expected number or 'Increment' undefined

@UnlikelySassou
Copy link

It has always been Increment with a capital "I", at least on the iOS side: http://blog.parse.com/announcements/badge-management-for-ios/

@goggelj
Copy link
Author

goggelj commented Mar 28, 2016

Interesting.

I actually found on your support forum a old post saying it was actually
lower case...

My python code has been triggering push for 8 months that way. Never worked
with upper case.
On 28 Mar 2016 1:04 p.m., "Sassou" notifications@github.com wrote:

It has always been Increment with a capital "I", at least on the iOS side:
http://blog.parse.com/announcements/badge-management-for-ios/


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1223 (comment)

@flovilmart
Copy link
Contributor

Uhm... Interesting, I can add the case for lowercase increment

@flovilmart
Copy link
Contributor

@drew-gross what should the spec be? I only recall Increment and not the lowercase flavour.

@drew-gross
Copy link
Contributor

I'm not really the best person to ask about push related stuff, but the docs say capital I, so I'd go with that?.

@tanmays
Copy link

tanmays commented Mar 29, 2016

I was using parse.com hosted cloud code and badge increment was indeed with a capital I. Docs too mention the same. We should retain the original spec.

@drew-gross
Copy link
Contributor

Or make it accept both for compatibility with Parse.com and existing Parse Server apps.

@flovilmart
Copy link
Contributor

I'll make it accept both in a future PR

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 a pull request may close this issue.

5 participants