fix delete

This commit is contained in:
wangchuxiao
2022-08-10 19:31:57 +08:00
parent cdc60ef5f0
commit 6bfa8643d6
7 changed files with 114 additions and 8 deletions
+24
View File
@@ -83,6 +83,7 @@ type Alert struct {
type Android struct {
Ups struct {
Notification Notification `json:"notification"`
Options Options `json:"options"`
} `json:"ups"`
}
@@ -92,6 +93,18 @@ type Notification struct {
ClickType string `json:"click_type"`
}
type Options struct {
HW struct {
DefaultSound bool `json:"/message/android/notification/default_sound"`
ChannelID string `json:"/message/android/notification/channel_id"`
Sound string `json:"/message/android/notification/sound"`
Importance string `json:"/message/android/notification/importance"`
} `json:"HW"`
XM struct {
ChannelID string `json:"/extra.channel_id"`
} `json:""`
}
type PushResp struct {
}
@@ -133,6 +146,17 @@ func (g *Getui) Push(userIDList []string, alert, detailContent, operationID stri
Body: alert,
ClickType: "startapp",
}
pushReq.PushChannel.Android.Ups.Options = Options{
HW: struct {
DefaultSound bool `json:"/message/android/notification/default_sound"`
ChannelID string `json:"/message/android/notification/channel_id"`
Sound string `json:"/message/android/notification/sound"`
Importance string `json:"/message/android/notification/importance"`
}{ChannelID: "RingRing4", Sound: "/raw/ring001", Importance: "importance"},
XM: struct {
ChannelID string `json:"/extra.channel_id"`
}{ChannelID: "Default"},
}
pushResp := PushResp{}
err = g.request(PushURL, pushReq, token, &pushResp, operationID)
switch err {