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

This commit is contained in:
wangchuxiao 2022-06-07 16:18:32 +08:00
commit 8f1e439381
2 changed files with 7 additions and 3 deletions

View File

@ -223,7 +223,7 @@ func (och *OnlineHistoryConsumerHandler) MessagesDistributionHandle() {
log.Error(triggerID, "msg_transfer Unmarshal msg err", "msg", string(consumerMessages[i].Value), "err", err.Error())
return
}
log.Debug(triggerID, "single msg come to distribution center", msgFromMQ.String(), string(consumerMessages[i].Key))
log.Debug(triggerID, "single msg come to distribution center", string(consumerMessages[i].Key))
if oldM, ok := UserAggregationMsgs[string(consumerMessages[i].Key)]; ok {
oldM = append(oldM, &msgFromMQ)
UserAggregationMsgs[string(consumerMessages[i].Key)] = oldM
@ -233,7 +233,7 @@ func (och *OnlineHistoryConsumerHandler) MessagesDistributionHandle() {
UserAggregationMsgs[string(consumerMessages[i].Key)] = m
}
}
log.Debug(triggerID, "generate map list users len", len(UserAggregationMsgs))
log.Debug(triggerID, "generate map list users len", len(UserAggregationMsgs), UserAggregationMsgs)
for userID, v := range UserAggregationMsgs {
if len(v) >= 0 {
hashCode := getHashCode(userID)

View File

@ -228,7 +228,7 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
return returnMsg(&replay, pb, 201, "GetGroupMemberIDListFromCache logic failed", "", 0)
}
memberUserIDList := cacheResp.UserIDList
log.Debug(pb.OperationID, "GetGroupAllMember userID list", cacheResp.UserIDList)
log.Debug(pb.OperationID, "GetGroupAllMember userID list", cacheResp.UserIDList, "len: ", len(cacheResp.UserIDList))
var addUidList []string
switch pb.MsgData.ContentType {
case constant.MemberKickedNotification:
@ -830,6 +830,10 @@ func (rpc *rpcChat) sendMsgToGroupOptimization(list []string, groupPB *pbChat.Se
groupPB.MsgData.RecvID = v
isSend := modifyMessageByUserMessageReceiveOpt(v, groupPB.MsgData.GroupID, constant.GroupChatType, groupPB)
if isSend {
if v == "" || groupPB.MsgData.SendID == "" {
log.Error(msgToMQGroup.OperationID, "sendMsgToGroupOptimization userID nil ", msgToMQGroup.String())
continue
}
err := rpc.sendMsgToKafka(&msgToMQGroup, v, status)
if err != nil {
log.NewError(msgToMQGroup.OperationID, "kafka send msg err:UserId", v, msgToMQGroup.String())