-
-
Notifications
You must be signed in to change notification settings - Fork 850
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
[Important] allow sending data ONLY notifications for FCM notifications #453
[Important] allow sending data ONLY notifications for FCM notifications #453
Conversation
@SebastienMelki https://cloud.drone.io/appleboy/gorush/195/1/7 Please update the code format. Try |
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.
code format error.
on it thanks |
done |
…ienMelki/gorush into data_only_fcm_notifications
Codecov Report
@@ Coverage Diff @@
## master #453 +/- ##
=========================================
Coverage ? 83.05%
=========================================
Files ? 20
Lines ? 1393
Branches ? 0
=========================================
Hits ? 1157
Misses ? 188
Partials ? 48
Continue to review full report at Codecov.
|
@SebastienMelki Thanks. |
Hey @appleboy ran into a little issue here need this tweak to be able send and process background notifications on android
If you want to process android notifications in the BACKGROUND, they need to be data notifications, as in not contain the "notification" key in the payload.
This little change achieves it, because omitempty on structs for the json encoding does not work on sub-structs except if it is a pointer to it and set to nil.