olucurious/PyFCM

The options click_action and low_priority not available anymore.

jarzac opened this issue · 2 comments

The following options when sending messages using push_service.notify are not available anymore.

  • click_action
  • low_priority

Where these renamed or moved somewhere else?

Starting with PyFCM v2, platform-specific parameters are specified in android_config and apns_config. Fields in Android are defined in the FCM HTTP v1 API AndroidConfigs.

Thus, click_action and low_priority can be specified as follows.

result = push_service.notify(
    topic_name="topic",
    notification_body=message,
    android_config={
        "priority": "normal",    # "high" for high priority
        "notification": {
            "click_action":"YOUR_ACTION"
        }
    }
)