This commit is contained in:
wangchuxiao 2022-12-21 19:56:25 +08:00
parent 0b4b408552
commit b08936c27e

View File

@ -167,12 +167,11 @@ func (g *Getui) Push(userIDList []string, title, detailContent, operationID stri
err = g.request(BatchPushURL, pushReq, token, &pushResp, operationID) err = g.request(BatchPushURL, pushReq, token, &pushResp, operationID)
} else { } else {
reqID := utils.OperationIDGenerator() reqID := utils.OperationIDGenerator()
pushReq = PushReq{ pushReq.RequestID = &reqID
RequestID: &reqID, pushReq.Audience = struct {
Audience: struct { Alias []string `json:"alias"`
Alias []string `json:"alias"` }{Alias: []string{userIDList[0]}}
}{Alias: []string{userIDList[0]}},
}
pushReq.PushChannel.Ios = &Ios{} pushReq.PushChannel.Ios = &Ios{}
pushReq.PushChannel.Ios.Aps.Sound = "default" pushReq.PushChannel.Ios.Aps.Sound = "default"
pushReq.PushChannel.Ios.Aps.Alert = Alert{ pushReq.PushChannel.Ios.Aps.Alert = Alert{