Added mutable_content option for Firebase (#364)

It is now possible to send `mutable_content` option to Firebase which gets forwarded as `mutable-content` option for APNS.

A link to official documentation is: https://firebase.google.com/docs/cloud-messaging/http-server-ref#mutable_content
This commit is contained in:
Eduard Pelesh
2018-08-15 06:47:15 +03:00
committed by Bo-Yi Wu
parent 437092c697
commit bf97ca59ec
7 changed files with 25 additions and 24 deletions

View File

@@ -1,10 +1,10 @@
# go-fcm
[![GoDoc](https://godoc.org/github.com/appleboy/go-fcm?status.svg)](https://godoc.org/github.com/edganiukov/fcm)
[![Build Status](https://travis-ci.org/appleboy/go-fcm.svg?branch=master)](https://travis-ci.org/edganiukov/fcm)
[![Go Report Card](https://goreportcard.com/badge/github.com/appleboy/go-fcm)](https://goreportcard.com/report/github.com/edganiukov/fcm)
[![GoDoc](https://godoc.org/github.com/appleboy/go-fcm?status.svg)](https://godoc.org/github.com/appleboy/go-fcm)
[![Build Status](https://travis-ci.org/appleboy/go-fcm.svg?branch=master)](https://travis-ci.org/appleboy/go-fcm)
[![Go Report Card](https://goreportcard.com/badge/github.com/appleboy/go-fcm)](https://goreportcard.com/report/github.com/appleboy/go-fcmm)
This project was forked from [github.com/edganiukov/fcmfcm](https://github.com/edganiukov/fcm).
This project was forked from [github.com/edganiukov/fcm](https://github.com/edganiukov/fcm).
Golang client library for Firebase Cloud Messaging. Implemented only [HTTP client](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream).

View File

@@ -24,6 +24,7 @@ var (
type Notification struct {
Title string `json:"title,omitempty"`
Body string `json:"body,omitempty"`
ChannelId string `json:"android_channel_id, omitempty"`
Icon string `json:"icon,omitempty"`
Sound string `json:"sound,omitempty"`
Badge string `json:"badge,omitempty"`
@@ -45,6 +46,7 @@ type Message struct {
CollapseKey string `json:"collapse_key,omitempty"`
Priority string `json:"priority,omitempty"`
ContentAvailable bool `json:"content_available,omitempty"`
MutableContent bool `json:"mutable_content,omitempty"`
DelayWhileIdle bool `json:"delay_while_idle,omitempty"`
TimeToLive *uint `json:"time_to_live,omitempty"`
DeliveryReceiptRequested bool `json:"delivery_receipt_requested,omitempty"`