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"`

8
vendor/vendor.json vendored
View File

@@ -21,12 +21,10 @@
"revisionTime": "2018-04-10T03:06:38Z"
},
{
"checksumSHA1": "1Jql7x7zDOmbDxGr4gsa8rFEC5g=",
"checksumSHA1": "gm1OOCOLjT16sLsu2jyvpXksx20=",
"path": "github.com/appleboy/go-fcm",
"revision": "3bc382cee4180b7e4753761fda69a003de97b0e9",
"revisionTime": "2017-10-25T02:33:50Z",
"version": "0.1.1",
"versionExact": "0.1.1"
"revision": "834eba2ee169f0930af5b355519f22f908cf3e49",
"revisionTime": "2018-08-14T17:09:15Z"
},
{
"checksumSHA1": "Ab7MUtqX0iq2PUzzBxWpgzPSydw=",