|
|
|
@ -51,7 +51,7 @@ func callbackBeforeSendSingleMsg(msg *pbChat.SendMsgReq) cbApi.CommonCallbackRes
|
|
|
|
|
}
|
|
|
|
|
//utils.CopyStructFields(req, msg.MsgData)
|
|
|
|
|
defer log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), req, *resp)
|
|
|
|
|
if err := http.PostReturn(config.Config.Callback.CallbackUrl, req, resp, config.Config.Callback.CallbackBeforeSendSingleMsg.CallbackTimeOut); err != nil {
|
|
|
|
|
if err := http.PostReturn(config.Config.Callback.CallbackUrl, constant.CallbackBeforeSendSingleMsgCommand, req, resp, config.Config.Callback.CallbackBeforeSendSingleMsg.CallbackTimeOut); err != nil {
|
|
|
|
|
callbackResp.ErrCode = http2.StatusInternalServerError
|
|
|
|
|
callbackResp.ErrMsg = err.Error()
|
|
|
|
|
if !config.Config.Callback.CallbackBeforeSendSingleMsg.CallbackFailedContinue {
|
|
|
|
@ -79,7 +79,7 @@ func callbackAfterSendSingleMsg(msg *pbChat.SendMsgReq) cbApi.CommonCallbackResp
|
|
|
|
|
}
|
|
|
|
|
resp := &cbApi.CallbackAfterSendSingleMsgResp{CommonCallbackResp: &callbackResp}
|
|
|
|
|
defer log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), req, *resp)
|
|
|
|
|
if err := http.PostReturn(config.Config.Callback.CallbackUrl, req, resp, config.Config.Callback.CallbackAfterSendSingleMsg.CallbackTimeOut); err != nil {
|
|
|
|
|
if err := http.PostReturn(config.Config.Callback.CallbackUrl, constant.CallbackAfterSendSingleMsgCommand, req, resp, config.Config.Callback.CallbackAfterSendSingleMsg.CallbackTimeOut); err != nil {
|
|
|
|
|
callbackResp.ErrCode = http2.StatusInternalServerError
|
|
|
|
|
callbackResp.ErrMsg = err.Error()
|
|
|
|
|
return callbackResp
|
|
|
|
@ -101,7 +101,7 @@ func callbackBeforeSendGroupMsg(msg *pbChat.SendMsgReq) cbApi.CommonCallbackResp
|
|
|
|
|
}
|
|
|
|
|
resp := &cbApi.CallbackBeforeSendGroupMsgResp{CommonCallbackResp: &callbackResp}
|
|
|
|
|
defer log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), req, *resp)
|
|
|
|
|
if err := http.PostReturn(config.Config.Callback.CallbackUrl, req, resp, config.Config.Callback.CallbackBeforeSendGroupMsg.CallbackTimeOut); err != nil {
|
|
|
|
|
if err := http.PostReturn(config.Config.Callback.CallbackUrl, constant.CallbackBeforeSendGroupMsgCommand, req, resp, config.Config.Callback.CallbackBeforeSendGroupMsg.CallbackTimeOut); err != nil {
|
|
|
|
|
callbackResp.ErrCode = http2.StatusInternalServerError
|
|
|
|
|
callbackResp.ErrMsg = err.Error()
|
|
|
|
|
if !config.Config.Callback.CallbackBeforeSendGroupMsg.CallbackFailedContinue {
|
|
|
|
@ -129,7 +129,7 @@ func callbackAfterSendGroupMsg(msg *pbChat.SendMsgReq) cbApi.CommonCallbackResp
|
|
|
|
|
}
|
|
|
|
|
resp := &cbApi.CallbackAfterSendGroupMsgResp{CommonCallbackResp: &callbackResp}
|
|
|
|
|
defer log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), req, *resp)
|
|
|
|
|
if err := http.PostReturn(config.Config.Callback.CallbackUrl, req, resp, config.Config.Callback.CallbackAfterSendGroupMsg.CallbackTimeOut); err != nil {
|
|
|
|
|
if err := http.PostReturn(config.Config.Callback.CallbackUrl, constant.CallbackAfterSendGroupMsgCommand, req, resp, config.Config.Callback.CallbackAfterSendGroupMsg.CallbackTimeOut); err != nil {
|
|
|
|
|
callbackResp.ErrCode = http2.StatusInternalServerError
|
|
|
|
|
callbackResp.ErrMsg = err.Error()
|
|
|
|
|
return callbackResp
|
|
|
|
@ -150,7 +150,7 @@ func callbackWordFilter(msg *pbChat.SendMsgReq) cbApi.CommonCallbackResp {
|
|
|
|
|
}
|
|
|
|
|
resp := &cbApi.CallbackWordFilterResp{CommonCallbackResp: &callbackResp}
|
|
|
|
|
defer log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), req, *resp)
|
|
|
|
|
if err := http.PostReturn(config.Config.Callback.CallbackUrl, req, resp, config.Config.Callback.CallbackWordFilter.CallbackTimeOut); err != nil {
|
|
|
|
|
if err := http.PostReturn(config.Config.Callback.CallbackUrl, constant.CallbackWordFilterCommand, req, resp, config.Config.Callback.CallbackWordFilter.CallbackTimeOut); err != nil {
|
|
|
|
|
callbackResp.ErrCode = http2.StatusInternalServerError
|
|
|
|
|
callbackResp.ErrMsg = err.Error()
|
|
|
|
|
if !config.Config.Callback.CallbackWordFilter.CallbackFailedContinue {
|
|
|
|
|