olucurious / PyFCM

Python client for FCM - Firebase Cloud Messaging (Android, iOS and Web)
http://olucurious.github.io/PyFCM/
MIT License
805 stars 205 forks source link

support "mutable_content" parameter #213

Closed folt closed 2 years ago

folt commented 6 years ago

Hi I need to send the "mutable_content" field but it is not in the available parameters. Was it possible to add his support?

https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream-http-messages-json

LucasHild commented 6 years ago

Hello,

you can add extra parameters like that:

extra_kwargs = {
    "mutable_content": True
}

push_service.notify_single_device(
    registration_id=registration_id,
    data_message=data_message,
    content_available=True,
    extra_kwargs=extra_kwargs
)

I hope that was helpful for you!

folt commented 6 years ago

Hello,

you can add extra parameters like that:

extra_kwargs = {
    "mutable_content": True
}

push_service.notify_single_device(
    registration_id=registration_id,
    data_message=data_message,
    content_available=True,
    extra_kwargs=extra_kwargs
)

I hope that was helpful for you!

Thank! I did about that when I read the library code.

romantolkachyov commented 6 years ago

Yeah, I found it in sources too. We need a better docs #216