fix callback bug

This commit is contained in:
wangchuxiao
2022-11-08 17:10:27 +08:00
parent 76a3334f9d
commit 3a3412486a
10 changed files with 25 additions and 25 deletions
+3 -3
View File
@@ -36,7 +36,7 @@ func callbackOfflinePush(operationID string, userIDList []string, msg *commonPb.
AtUserIDList: msg.AtUserIDList,
Content: callback.GetContent(msg),
}
resp := &cbApi.CallbackBeforePushResp{CommonCallbackResp: callbackResp}
resp := &cbApi.CallbackBeforePushResp{CommonCallbackResp: &callbackResp}
if err := http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackOfflinePushCommand, req, resp, config.Config.Callback.CallbackOfflinePush.CallbackTimeOut); err != nil {
callbackResp.ErrCode = http2.StatusInternalServerError
callbackResp.ErrMsg = err.Error()
@@ -84,7 +84,7 @@ func callbackOnlinePush(operationID string, userIDList []string, msg *commonPb.M
AtUserIDList: msg.AtUserIDList,
Content: callback.GetContent(msg),
}
resp := &cbApi.CallbackBeforePushResp{CommonCallbackResp: callbackResp}
resp := &cbApi.CallbackBeforePushResp{CommonCallbackResp: &callbackResp}
if err := http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackOnlinePushCommand, req, resp, config.Config.Callback.CallbackOnlinePush.CallbackTimeOut); err != nil {
callbackResp.ErrCode = http2.StatusInternalServerError
callbackResp.ErrMsg = err.Error()
@@ -126,7 +126,7 @@ func callbackBeforeSuperGroupOnlinePush(operationID string, groupID string, msg
AtUserIDList: msg.AtUserIDList,
Content: callback.GetContent(msg),
}
resp := &cbApi.CallbackBeforeSuperGroupOnlinePushResp{CommonCallbackResp: callbackResp}
resp := &cbApi.CallbackBeforeSuperGroupOnlinePushResp{CommonCallbackResp: &callbackResp}
if err := http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackSuperGroupOnlinePushCommand, req, resp, config.Config.Callback.CallbackBeforeSuperGroupOnlinePush.CallbackTimeOut); err != nil {
callbackResp.ErrCode = http2.StatusInternalServerError
callbackResp.ErrMsg = err.Error()