Closed monicaphalswal closed 7 years ago
Please reply. Is this an issue with fcm-django because I was able to send this key with pyFCM?
How are you passing kwargs and which version of pyfcm and fcm-django library are you using?
c9e4bad @monicaphalswal check this commit, I think you're using older version of PyFCM
The version info is as below for the two packages: Name: pyfcm Version: 1.2.9
Name: fcm-django Version: 0.2.7
kwargs = {
'content_available': True,
'time_to_live': 30,
'mutable_content': True
}
devices.send_message(
title="Name",
icon="appicon",
data={
"notification type" : 2,
},
**kwargs
)
I am getting error: TypeError: notify_single_device() got an unexpected keyword argument 'mutable_content'
On a second look, there actually is no mutable content as a keyword argument in that function, so you should be passing it in an 'extra_kwargs' dict in 'kwargs'.
For example:
kwargs = { extra_kwargs = { mutable_content: True } }
Let me know if that works for you.
I'm not able to send
"mutable_content": True
in extra kwargs as an additional keyword argument (which is required to send rich notifications to iOS). I am gettingnotify_single_device() got an unexpected keyword argument 'mutable_content'
error. I looked in PyFCM documentation, it supports this field in additional arguments. Please help.