push_channel

This commit is contained in:
jiangyong27 2024-02-29 19:58:49 +08:00
parent ee53e62bb7
commit 354b99c47c
1 changed files with 11 additions and 0 deletions

View File

@ -121,6 +121,17 @@ func (g *Getui) Push(req *GetuiMessage) error {
"click_type": "startapp",
},
}
params["push_channel"] = map[string]interface{}{
"android": map[string]interface{}{
"ups": map[string]interface{}{
"notification": map[string]interface{}{
"title": req.Title,
"body": req.Message,
"click_type": "startapp",
},
},
},
}
reqBody, _ := json.Marshal(params)
_, err := util.HttpPostJson(reqUrl, map[string]string{"token": g.Token()}, reqBody)
if err != nil {