From f174514a475f7e63224cd09f2f18538d06464428 Mon Sep 17 00:00:00 2001 From: Felipe Benevides Date: Wed, 10 Apr 2024 17:32:39 +0200 Subject: [PATCH] Add more info to Android config (#6) * Add more info to Android config * Change data type to a map[string]string * Remove error from http response --- requests.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/requests.go b/requests.go index d3f97df..d7f59a5 100644 --- a/requests.go +++ b/requests.go @@ -18,7 +18,11 @@ type FcmNotification struct { } type FcmAndroidConfig struct { - Notification *FcmAndroidNotification `json:"notification"` + CollapseKey string `json:"collapse_key"` + Priority string `json:"priority,omitempty"` + TimeToLive *string `json:"ttl,omitempty"` + RestrictedPackageName string `json:"restricted_package_name,omitempty"` + Notification *FcmAndroidNotification `json:"notification"` } type FcmAndroidNotification struct { @@ -37,7 +41,7 @@ type FcmAndroidNotification struct { NotificationCount int `json:"notification_count,omitempty"` } -type FcmData map[string]map[string]interface{} +type FcmData map[string]string type FcmSendHttpResponse struct { Status int `json:"-"`