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,7 +88,8 @@ type PushReq struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Ios struct {
|
type Ios struct {
|
||||||
Aps struct {
|
NotiType *string `json:"type"`
|
||||||
|
Aps struct {
|
||||||
Sound string `json:"sound"`
|
Sound string `json:"sound"`
|
||||||
Alert Alert `json:"alert"`
|
Alert Alert `json:"alert"`
|
||||||
} `json:"aps"`
|
} `json:"aps"`
|
||||||
@ -166,8 +167,7 @@ func (g *Getui) Push(userIDList []string, title, detailContent, operationID stri
|
|||||||
var IsAsync = false
|
var IsAsync = false
|
||||||
pushReq.IsAsync = &IsAsync
|
pushReq.IsAsync = &IsAsync
|
||||||
pushReq.Taskid = &taskID
|
pushReq.Taskid = &taskID
|
||||||
pushReq.PushMessage.Notification = nil
|
pushReq.PushMessage = nil
|
||||||
pushReq.PushMessage.Transmission = nil
|
|
||||||
pushReq.Audience = &Audience{Alias: userIDList}
|
pushReq.Audience = &Audience{Alias: userIDList}
|
||||||
pushReq.setPushChannel(title, detailContent)
|
pushReq.setPushChannel(title, detailContent)
|
||||||
err = g.request(BatchPushURL, pushReq, token, &pushResp, operationID)
|
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.RequestID = &reqID
|
||||||
pushReq.Audience = &Audience{Alias: []string{userIDList[0]}}
|
pushReq.Audience = &Audience{Alias: []string{userIDList[0]}}
|
||||||
pushReq.setPushChannel(title, detailContent)
|
pushReq.setPushChannel(title, detailContent)
|
||||||
|
notify := "notify"
|
||||||
|
pushReq.PushChannel.Ios.NotiType = ¬ify
|
||||||
err = g.request(PushURL, pushReq, token, &pushResp, operationID)
|
err = g.request(PushURL, pushReq, token, &pushResp, operationID)
|
||||||
}
|
}
|
||||||
switch err {
|
switch err {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user