-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Update OneSignalPushAdapter.js [More Parameters Added for Android] #770
Conversation
@@ -134,7 +134,42 @@ export class OneSignalPushAdapter extends PushAdapter { | |||
if(data['uri']) { | |||
post['url'] = data['uri']; | |||
} | |||
|
|||
if(data['android_background_data']) |
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.
it would be nicer with a reduce:
post = ['android_background_data', ...].reduce( (post, key) {
if (data[key]) {
post[key] = data[key];
delete data[key];
}
return post;
}, post);
@mithleshjs updated the pull request. |
@mithleshjs updated the pull request. |
3 similar comments
@mithleshjs updated the pull request. |
@mithleshjs updated the pull request. |
@mithleshjs updated the pull request. |
@flovilmart using reduce is causing build to fail and it overrides other params. I think it is best without a reduce. |
What do you mean it overrides other params and build is failing? |
What I meant was that implementating reduce method as pointed by you is not working correctly. |
You mean with the ... ? |
I was referring to this note by you.
This method didn't work. |
|
Extra Parameters Added: