Missing click-action key for webpush payload on me

2019-02-25 20:00发布

问题:

I am sending a web push notification to a client browser via FCM HTTPv1. I would like to add an action when the notification is clicked.

I know one can do it with the FCM Admin SDK: 'clickAction' is one of the key of admin.messaging.NotificationMessagePayload.

But WebPushNotification from the message payload sent via FCM HTTPv1 only includes 'title', 'body' and 'icon'.

How to add actions to web push notifications sent via FCM HTTPv1?