Merge branch 'tuoyun' of github.com:OpenIMSDK/Open-IM-Server into tuoyun

This commit is contained in:
wangchuxiao
2022-03-03 14:18:35 +08:00
5 changed files with 20 additions and 18 deletions
+8 -8
View File
@@ -126,14 +126,14 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
}
// callback
canSend, err := callBackWordFilter(pb)
if err != nil {
log.NewError(pb.OperationID, utils.GetSelfFuncName(), "CallbackBeforeSendMsg failed", err.Error(), pb.MsgData)
}
if !canSend {
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)
}
//canSend, err := callBackWordFilter(pb)
//if err != nil {
// log.NewError(pb.OperationID, utils.GetSelfFuncName(), "CallbackBeforeSendMsg failed", err.Error(), pb.MsgData)
//}
//if !canSend {
// 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)
//}
switch pb.MsgData.SessionType {
case constant.SingleChatType:
canSend, err := callbackBeforeSendSingleMsg(pb)