mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-10 20:15:59 +08:00
Fix lint errors in modified code (#1966)
* makelint /internal 0228 Signed-off-by: xuan <146319162+wxuanF@users.noreply.github.com> * Update server.go --------- Signed-off-by: xuan <146319162+wxuanF@users.noreply.github.com>
This commit is contained in:
@@ -66,7 +66,7 @@ func (m *msgServer) sendMsgSuperGroupChat(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err := callbackMsgModify(ctx, req); err != nil {
|
||||
if modifyErr := callbackMsgModify(ctx, req); modifyErr != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = m.MsgDatabase.MsgToMQ(ctx, utils.GenConversationUniqueKeyForGroup(req.MsgData.GroupID), req.MsgData)
|
||||
@@ -144,7 +144,7 @@ func (m *msgServer) sendMsgNotification(
|
||||
}
|
||||
|
||||
func (m *msgServer) sendMsgSingleChat(ctx context.Context, req *pbmsg.SendMsgReq) (resp *pbmsg.SendMsgResp, err error) {
|
||||
if err := m.messageVerification(ctx, req); err != nil {
|
||||
if verificationErr := m.messageVerification(ctx, req); verificationErr != nil {
|
||||
return nil, err
|
||||
}
|
||||
isSend := true
|
||||
@@ -169,10 +169,10 @@ func (m *msgServer) sendMsgSingleChat(ctx context.Context, req *pbmsg.SendMsgReq
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err := callbackMsgModify(ctx, req); err != nil {
|
||||
if modifyErr := callbackMsgModify(ctx, req); modifyErr != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := m.MsgDatabase.MsgToMQ(ctx, utils.GenConversationUniqueKeyForSingle(req.MsgData.SendID, req.MsgData.RecvID), req.MsgData); err != nil {
|
||||
if mqErr := m.MsgDatabase.MsgToMQ(ctx, utils.GenConversationUniqueKeyForSingle(req.MsgData.SendID, req.MsgData.RecvID), req.MsgData); mqErr != nil {
|
||||
prommetrics.SingleChatMsgProcessFailedCounter.Inc()
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user