mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Remove duplicate messageVerification call in sendMsg
This commit is contained in:
parent
d6abbacbf7
commit
9d73fc9932
@ -245,11 +245,11 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
|
||||
if !flag {
|
||||
return returnMsg(&replay, pb, errCode, errMsg, "", 0)
|
||||
}
|
||||
flag, errCode, errMsg, _ = messageVerification(pb)
|
||||
log.Info(pb.OperationID, "messageVerification ", flag, " cost time: ", time.Since(t1))
|
||||
if !flag {
|
||||
return returnMsg(&replay, pb, errCode, errMsg, "", 0)
|
||||
}
|
||||
//flag, errCode, errMsg, _ = messageVerification(pb)
|
||||
//log.Info(pb.OperationID, "messageVerification ", flag, " cost time: ", time.Since(t1))
|
||||
//if !flag {
|
||||
// return returnMsg(&replay, pb, errCode, errMsg, "", 0)
|
||||
//}
|
||||
t1 = time.Now()
|
||||
rpc.encapsulateMsgData(pb.MsgData)
|
||||
log.Info(pb.OperationID, "encapsulateMsgData ", " cost time: ", time.Since(t1))
|
||||
@ -287,6 +287,11 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
|
||||
promePkg.PromeInc(promePkg.SingleChatMsgProcessFailedCounter)
|
||||
return returnMsg(&replay, pb, int32(callbackResp.ErrCode), callbackResp.ErrMsg, "", 0)
|
||||
}
|
||||
flag, errCode, errMsg, _ = messageVerification(pb)
|
||||
log.Info(pb.OperationID, "messageVerification ", flag, " cost time: ", time.Since(t1))
|
||||
if !flag {
|
||||
return returnMsg(&replay, pb, errCode, errMsg, "", 0)
|
||||
}
|
||||
t1 = time.Now()
|
||||
isSend := modifyMessageByUserMessageReceiveOpt(pb.MsgData.RecvID, pb.MsgData.SendID, constant.SingleChatType, pb)
|
||||
log.Info(pb.OperationID, "modifyMessageByUserMessageReceiveOpt ", " cost time: ", time.Since(t1))
|
||||
|
Loading…
x
Reference in New Issue
Block a user