From 5a37fba851618687a747fc44213b722fb73626be Mon Sep 17 00:00:00 2001 From: Sinh Date: Mon, 27 Mar 2023 11:42:26 +0700 Subject: [PATCH 1/2] add option save notification --- model.go | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/model.go b/model.go index 2136744..be4d6e7 100644 --- a/model.go +++ b/model.go @@ -10,16 +10,17 @@ type Config struct { // PushRequest ... type PushRequest struct { - Title string `json:"title"` - Body string `json:"body"` - Data string `json:"data"` - Users []string `json:"users"` - Label string `json:"label,omitempty"` - Category string `json:"category,omitempty"` - Sound *Sound `json:"sound,omitempty"` - Link string `json:"link"` // for webpush - Order int `json:"order"` // for sort - DisplayUntil int64 `json:"displayUntil"` // time.Unix + Title string `json:"title"` + Body string `json:"body"` + Data string `json:"data"` + Users []string `json:"users"` + Label string `json:"label,omitempty"` + Category string `json:"category,omitempty"` + Sound *Sound `json:"sound,omitempty"` + Link string `json:"link"` // for webpush + Order int `json:"order"` // for sort + DisplayUntil int64 `json:"displayUntil"` // time.Unix + SaveNotification bool `json:"saveNotification"` } // Sound ... From 1c35dfb76ab1dffa4e9886f8bab96743b6a8784f Mon Sep 17 00:00:00 2001 From: Sinh Date: Mon, 27 Mar 2023 11:44:08 +0700 Subject: [PATCH 2/2] add option save notification --- notification.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notification.go b/notification.go index d23ba49..59feaeb 100644 --- a/notification.go +++ b/notification.go @@ -9,7 +9,7 @@ import ( ) // version specify current version of client -const version = "1.0.3" +const version = "1.0.4" const ( SendByTopic = "topic"