mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-09 19:45:58 +08:00
callback
This commit is contained in:
@@ -55,9 +55,9 @@ func (j *JPush) Push(ctx context.Context, userIDs []string, title, content strin
|
||||
pushObj.SetMessage(&msg)
|
||||
pushObj.SetOptions(&opt)
|
||||
var resp interface{}
|
||||
return j.request(pushObj, resp, 5)
|
||||
return j.request(ctx, pushObj, resp, 5)
|
||||
}
|
||||
|
||||
func (j *JPush) request(po body.PushObj, resp interface{}, timeout int) error {
|
||||
return http2.PostReturn(config.Config.Push.Jpns.PushUrl, map[string]string{"Authorization": j.getAuthorization(config.Config.Push.Jpns.AppKey, config.Config.Push.Jpns.MasterSecret)}, po, resp, timeout)
|
||||
func (j *JPush) request(ctx context.Context, po body.PushObj, resp interface{}, timeout int) error {
|
||||
return http2.PostReturn(ctx, config.Config.Push.Jpns.PushUrl, map[string]string{"Authorization": j.getAuthorization(config.Config.Push.Jpns.AppKey, config.Config.Push.Jpns.MasterSecret)}, po, resp, timeout)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user