pull/232/head
wangchuxiao 3 years ago
parent e5945fa720
commit 884b410dce

@ -155,7 +155,7 @@ func callbackWordFilter(msg *pbChat.SendMsgReq) cbApi.CommonCallbackResp {
return callbackResp
}
}
if resp.ErrCode == constant.CallbackHandleSuccess && resp.ActionCode == constant.ActionAllow {
if resp.ErrCode == constant.CallbackHandleSuccess && resp.ActionCode == constant.ActionAllow && resp.Content != "" {
msg.MsgData.Content = []byte(resp.Content)
}
log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), string(msg.MsgData.Content))

@ -155,7 +155,7 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
// callback
callbackResp := callbackWordFilter(pb)
if callbackResp.ErrCode != 0 {
log.NewError(pb.OperationID, utils.GetSelfFuncName(), "callbackWordFilter resp: ", callbackResp)
log.NewDebug(pb.OperationID, utils.GetSelfFuncName(), "callbackWordFilter resp: ", callbackResp)
}
log.NewDebug(pb.OperationID, utils.GetSelfFuncName(), "callbackResp: ", callbackResp)
if callbackResp.ActionCode != constant.ActionAllow {

Loading…
Cancel
Save