From 6bf0a3a8043a4292b9195f6a9e5fbf58b86cb968 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Thu, 22 Dec 2022 16:28:36 +0800 Subject: [PATCH] push --- internal/push/getui/push.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/push/getui/push.go b/internal/push/getui/push.go index 7b63b988b..565d62df0 100644 --- a/internal/push/getui/push.go +++ b/internal/push/getui/push.go @@ -88,7 +88,8 @@ type PushReq struct { } type Ios struct { - Aps struct { + NotiType *string `json:"type"` + Aps struct { Sound string `json:"sound"` Alert Alert `json:"alert"` } `json:"aps"` @@ -166,8 +167,7 @@ func (g *Getui) Push(userIDList []string, title, detailContent, operationID stri var IsAsync = false pushReq.IsAsync = &IsAsync pushReq.Taskid = &taskID - pushReq.PushMessage.Notification = nil - pushReq.PushMessage.Transmission = nil + pushReq.PushMessage = nil pushReq.Audience = &Audience{Alias: userIDList} pushReq.setPushChannel(title, detailContent) err = g.request(BatchPushURL, pushReq, token, &pushResp, operationID) @@ -176,6 +176,8 @@ func (g *Getui) Push(userIDList []string, title, detailContent, operationID stri pushReq.RequestID = &reqID pushReq.Audience = &Audience{Alias: []string{userIDList[0]}} pushReq.setPushChannel(title, detailContent) + notify := "notify" + pushReq.PushChannel.Ios.NotiType = ¬ify err = g.request(PushURL, pushReq, token, &pushResp, operationID) } switch err {