-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Updated iOS alert object to display title and body detail #735
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
Conversation
Thanks for the PR, @repertus ! Would you mind showing a screenshot of the result? Also, could you please update the Changelog.md file as well, to contain your improvement? |
I will need you help looking at why the build failed in Travis with one of the newer versions of node.js. |
@@ -39,7 +39,13 @@ const EXP_STATS_URL = 'http://docs.parseplatform.org/ios/guide/#push-experiments | |||
let getMessage = (payload) => { | |||
if(payload) { | |||
let payloadJSON = JSON.parse(payload); | |||
return payloadJSON.alert ? payloadJSON.alert : payload; | |||
if (payloadJSON.alert.body) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to check the type of payloadJSON.alert
, like in the other changed file? Also, in case there is a body, could you also add the title?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@natanrolnik - So under PushDetails if an alert object contains title and body, would you like me to show both the title and message just below the title in smaller font size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be ideal! Do you think you can do it? I think it makes sense to do it the best way we can if you are already touching these files.
And did you see my question? Don't we need to check the type of payloadJSON.alert
, or it will always be an object here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@repertus Robert, we wanted to make a release in the next few days - if you could do these changes, it will enter in the next release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you outline why the build is failing in Travis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@repertus Sorry, I was afk for a few hours. Thanks for working on it!
Hey this feature is neat!, @repertus do you have time to wrap it up? or can we help? How does it work in this case? @natanrolnik Cheers |
Merged! Thank you so much for your efforts, @repertus! |
This fix addresses the issue outlined in #539 by being able to now render the title and body keys from the alert object.