-
Notifications
You must be signed in to change notification settings - Fork 189
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
Send additional fields in kwargs #12
Comments
'kwargs' is not a keyword argument, so don't name it, just pass it as the last argument. Also please be more specific as to how the payload gets 'messed up'. |
I changed the code to:
But now I am getting error: And for the missing 'body' part, the payload changes from |
http://stackoverflow.com/questions/1496346/passing-a-list-of-kwargs for passing kwargs |
For the second part - pyfcm's github page is where that question would be answered best, because that part is handled in this file. |
Thank you for the help. But, I'm still not able to send |
How did you end up fixing this? @monicaphalswal |
The initial problem was that the function call had The second problem is different (passing an unknown parameter to a function). |
The question is for an obsolete version which used the legacy API, so this question is most likely not relevant anymore |
Ah okay. I want to add channel_id from https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#androidnotification to my notification payload so I was looking at this to see how it would be possible. I was thinking this would work but maybe I am on the wrong track?
|
And the channel ID you would pass into the Message constructor under android_config, see |
extra_kwargs = {
'content_available': True
}
devices.send_message(
title="Syncup",
body=".",
icon="appicon",
data={
"notification type" : 20
},
kwargs=extra_kwargs
)
I am trying to send additional fields in kwargs but I am getting
notify_multiple_devices() got an unexpected keyword argument 'kwargs'
. Please help.Also, I don't want to send the key "body" but when I skip it or make it None, the payload gets messed up. So, is it possible it skip this key entirely?
The text was updated successfully, but these errors were encountered: