parse-server-push-adapter icon indicating copy to clipboard operation
parse-server-push-adapter copied to clipboard

fix: Setting the iOS `alert` property overwrites the `title` property

Open chadpav opened this issue 1 year ago • 4 comments

New Pull Request Checklist

  • [x] I am not disclosing a vulnerability.
  • [x] I am creating this PR in reference to an issue.

Issue Description

When title and alert are provided as a strings, the adapter code has to convert the Parse dictionary to the format that FCM is expecting. This would set the title property first and then reinitialize the alert key before setting the alert. This would wipe out the title property.

Related issue: #286

Approach

In the switch statement where both alert and title get set, the title property was correctly checking if the alert property was already set before initializing it. All I had to do was copy that code up to the alert case.

Closes: #286

TODOs before merging

  • [x] Add tests
  • [ ] Add entry to changelog
  • [ ] Add changes to documentation (guides, repository pages, in-code descriptions)

chadpav avatar Aug 13 '24 13:08 chadpav

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

I will reformat the title to use the proper commit message syntax.

I will reformat the title to use the proper commit message syntax.

Just a friendly ping, if you find some time to address the review feedback, then we could go ahead and merge this...

mtrezza avatar Nov 20 '24 18:11 mtrezza