Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ForegroundShow flag #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 35 additions & 35 deletions src/push/model/message_hm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down