From adc81b8ff49e3a97289b96cef8776d1a42f34dca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hila=CC=81rio=20Coelho?= Date: Fri, 10 Dec 2021 11:55:46 +0000 Subject: [PATCH] fix foregroundshow flag --- src/push/model/message_hm.go | 70 ++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/src/push/model/message_hm.go b/src/push/model/message_hm.go index 42e3e0f..25d4fb3 100644 --- a/src/push/model/message_hm.go +++ b/src/push/model/message_hm.go @@ -32,44 +32,44 @@ type AndroidConfig struct { } type AndroidNotification struct { - Title string `json:"title,omitempty"` - Body string `json:"body,omitempty"` - Icon string `json:"icon,omitempty"` - Color string `json:"color,omitempty"` - Sound string `json:"sound,omitempty"` - DefaultSound bool `json:"default_sound,omitempty"` - Tag string `json:"tag,omitempty"` - ClickAction *ClickAction `json:"click_action,omitempty"` - BodyLocKey string `json:"body_loc_key,omitempty"` - BodyLocArgs []string `json:"body_loc_args,omitempty"` - TitleLocKey string `json:"title_loc_key,omitempty"` - TitleLocArgs []string `json:"title_loc_args,omitempty"` - MultiLangKey map[string]interface{} `json:"multi_lang_key,omitempty"` - ChannelId string `json:"channel_id,omitempty"` - NotifySummary string `json:"notify_summary,omitempty"` - Image string `json:"image,omitempty"` - Style int `json:"style,omitempty"` - BigTitle string `json:"big_title,omitempty"` - BigBody string `json:"big_body,omitempty"` - - AutoClear int `json:"auto_clear,omitempty"` - NotifyId int `json:"notify_id,omitempty"` - Group string `json:"group,omitempty"` - Badge *BadgeNotification `json:"badge,omitempty,omitempty"` - Ticker string `json:"ticker,omitempty"` - AutoCancel bool `json:"auto_cancel,omitempty"` - when string `json:"when,omitempty"` - Importance string `json:"importance,omitempty"` - UseDefaultVibrate bool `json:"use_default_vibrate,omitempty"` - UseDefaultLight bool `json:"use_default_light,omitempty"` - VibrateConfig []string `json:"vibrate_config,omitempty"` - Visibility string `json:"visibility,omitempty"` - LightSettings *LightSettings `json:"light_settings,omitempty"` - ForegroundShow bool `json:"foreground_show,omitempty"` + Title string `json:"title,omitempty"` + Body string `json:"body,omitempty"` + Icon string `json:"icon,omitempty"` + Color string `json:"color,omitempty"` + Sound string `json:"sound,omitempty"` + DefaultSound bool `json:"default_sound,omitempty"` + Tag string `json:"tag,omitempty"` + ClickAction *ClickAction `json:"click_action,omitempty"` + BodyLocKey string `json:"body_loc_key,omitempty"` + BodyLocArgs []string `json:"body_loc_args,omitempty"` + TitleLocKey string `json:"title_loc_key,omitempty"` + TitleLocArgs []string `json:"title_loc_args,omitempty"` + MultiLangKey map[string]interface{} `json:"multi_lang_key,omitempty"` + ChannelId string `json:"channel_id,omitempty"` + NotifySummary string `json:"notify_summary,omitempty"` + Image string `json:"image,omitempty"` + Style int `json:"style,omitempty"` + BigTitle string `json:"big_title,omitempty"` + BigBody string `json:"big_body,omitempty"` + + AutoClear int `json:"auto_clear,omitempty"` + NotifyId int `json:"notify_id,omitempty"` + Group string `json:"group,omitempty"` + Badge *BadgeNotification `json:"badge,omitempty,omitempty"` + Ticker string `json:"ticker,omitempty"` + AutoCancel bool `json:"auto_cancel,omitempty"` + when string `json:"when,omitempty"` + Importance string `json:"importance,omitempty"` + UseDefaultVibrate bool `json:"use_default_vibrate,omitempty"` + UseDefaultLight bool `json:"use_default_light,omitempty"` + VibrateConfig []string `json:"vibrate_config,omitempty"` + Visibility string `json:"visibility,omitempty"` + LightSettings *LightSettings `json:"light_settings,omitempty"` + ForegroundShow bool `json:"foreground_show"` } type ClickAction struct { - Type int `json:"type"` //when the type equals to 1, At least one of intent and action is not empty + Type int `json:"type"` // when the type equals to 1, At least one of intent and action is not empty Intent string `json:"intent,omitempty"` Action string `json:"action,omitempty"` Url string `json:"url,omitempty"`