Skip to content

FCM send_message return type is not compatible with previous output #722

Open
@sevdog

Description

@sevdog

The implementation with firebase SDK has changed the output of the send_message method

Before it was a dict

return ret[0] if len(ret) == 1 else ret
else:
return _cm_send_request(None, data, cloud_type=cloud_type, **kwargs)

Now it is a BatchResponse

return messaging.BatchResponse(ret)
else:
return messaging.BatchResponse([])

This means that any code which relies on the output to be a dict now need to work-around the new type.

This is a breaking change which should have been highlighted or avoided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions