mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-05 17:56:50 +08:00
push
This commit is contained in:
parent
4bcaa5eaca
commit
6bf0a3a804
@ -88,6 +88,7 @@ type PushReq struct {
|
||||
}
|
||||
|
||||
type Ios struct {
|
||||
NotiType *string `json:"type"`
|
||||
Aps struct {
|
||||
Sound string `json:"sound"`
|
||||
Alert Alert `json:"alert"`
|
||||
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user