callback note

This commit is contained in:
Gordon 2022-03-03 12:11:38 +08:00
parent 53cdf884ef
commit 97ec9602f7

View File

@ -126,14 +126,14 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
} }
// callback // callback
canSend, err := callBackWordFilter(pb) //canSend, err := callBackWordFilter(pb)
if err != nil { //if err != nil {
log.NewError(pb.OperationID, utils.GetSelfFuncName(), "CallbackBeforeSendMsg failed", err.Error(), pb.MsgData) // log.NewError(pb.OperationID, utils.GetSelfFuncName(), "CallbackBeforeSendMsg failed", err.Error(), pb.MsgData)
} //}
if !canSend { //if !canSend {
log.NewDebug(pb.OperationID, utils.GetSelfFuncName(), "callback result", canSend, "end rpc and return", pb.MsgData) // log.NewDebug(pb.OperationID, utils.GetSelfFuncName(), "callback result", canSend, "end rpc and return", pb.MsgData)
return returnMsg(&replay, pb, 201, "callback result stop rpc and return", "", 0) // return returnMsg(&replay, pb, 201, "callback result stop rpc and return", "", 0)
} //}
switch pb.MsgData.SessionType { switch pb.MsgData.SessionType {
case constant.SingleChatType: case constant.SingleChatType:
canSend, err := callbackBeforeSendSingleMsg(pb) canSend, err := callbackBeforeSendSingleMsg(pb)