From b08936c27e4ce38b3d82de624dcae63eee4a1165 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Wed, 21 Dec 2022 19:56:25 +0800 Subject: [PATCH] push --- internal/push/getui/push.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/internal/push/getui/push.go b/internal/push/getui/push.go index 21176b466..759ce2a24 100644 --- a/internal/push/getui/push.go +++ b/internal/push/getui/push.go @@ -167,12 +167,11 @@ func (g *Getui) Push(userIDList []string, title, detailContent, operationID stri err = g.request(BatchPushURL, pushReq, token, &pushResp, operationID) } else { reqID := utils.OperationIDGenerator() - pushReq = PushReq{ - RequestID: &reqID, - Audience: struct { - Alias []string `json:"alias"` - }{Alias: []string{userIDList[0]}}, - } + pushReq.RequestID = &reqID + pushReq.Audience = struct { + Alias []string `json:"alias"` + }{Alias: []string{userIDList[0]}} + pushReq.PushChannel.Ios = &Ios{} pushReq.PushChannel.Ios.Aps.Sound = "default" pushReq.PushChannel.Ios.Aps.Alert = Alert{