Skip to content
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

message_body is required to send messages with loc_key, loc_args #84

Closed
allanlei opened this issue Nov 7, 2016 · 0 comments
Closed

Comments

@allanlei
Copy link

allanlei commented Nov 7, 2016

To send a message using body_loc_key, body_loc_args, title_loc_key or title_loc_args, the message_body kwargs must be set to non-empty.

According to FCM docs, body(message_body) is optional. It was my understanding that body and body_loc_key+body_loc_args are independent.

The condition check in question:
https://github.com/olucurious/PyFCM/blob/master/pyfcm/baseapi.py#L133

My current workaround to use body_loc_key and body_loc_args is

notify_multiple_devices(
        registration_ids=[],
        message_body=' ',    // single space string
        body_loc_key='mykey',
        body_loc_args=['a', 'b', 'c'],
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants