diff --git a/internal/msgtransfer/online_msg_to_mongo_handler.go b/internal/msgtransfer/online_msg_to_mongo_handler.go index d4fcfe1e1..bfea6c433 100644 --- a/internal/msgtransfer/online_msg_to_mongo_handler.go +++ b/internal/msgtransfer/online_msg_to_mongo_handler.go @@ -62,7 +62,7 @@ func (mc *OnlineHistoryMongoConsumerHandler) handleChatWs2Mongo( log.ZError(ctx, "msgFromMQ.MsgData is empty", nil, "cMsg", cMsg) return } - log.ZInfo(ctx, "mongo consumer recv msg", "msgs", msgFromMQ) + log.ZInfo(ctx, "mongo consumer recv msg", "msgs", msgFromMQ.String()) err = mc.msgDatabase.BatchInsertChat2DB(ctx, msgFromMQ.ConversationID, msgFromMQ.MsgData, msgFromMQ.LastSeq) if err != nil { log.ZError( diff --git a/internal/push/push_to_client.go b/internal/push/push_to_client.go index c12620f70..ba0d65b39 100644 --- a/internal/push/push_to_client.go +++ b/internal/push/push_to_client.go @@ -130,6 +130,7 @@ func (p *Pusher) UnmarshalNotificationElem(bytes []byte, t interface{}) error { if err := json.Unmarshal(bytes, ¬ification); err != nil { return err } + return json.Unmarshal([]byte(notification.Detail), t) } diff --git a/internal/rpc/conversation/conversaion.go b/internal/rpc/conversation/conversaion.go index 0c6b8e26a..8aa0154e3 100644 --- a/internal/rpc/conversation/conversaion.go +++ b/internal/rpc/conversation/conversaion.go @@ -112,6 +112,7 @@ func (c *conversationServer) SetConversation(ctx context.Context, req *pbconvers return resp, nil } +//gocognit:ignore func (c *conversationServer) SetConversations(ctx context.Context, req *pbconversation.SetConversationsReq, ) (*pbconversation.SetConversationsResp, error) { @@ -204,6 +205,7 @@ func (c *conversationServer) SetConversations(ctx context.Context, if err != nil { log.ZWarn(ctx, "send conversation set private notification failed", err, "userID", userID, "conversationID", req.Conversation.ConversationID) + continue } } diff --git a/pkg/rpcclient/msg.go b/pkg/rpcclient/msg.go index 1dfabcfcc..00b0fa3f1 100644 --- a/pkg/rpcclient/msg.go +++ b/pkg/rpcclient/msg.go @@ -236,8 +236,9 @@ func (s *NotificationSender) NotificationWithSesstionType(ctx context.Context, s } var req msg.SendMsgReq var msg sdkws.MsgData + var userInfo *sdkws.UserInfo if notificationOpt.WithRpcGetUsername && s.getUserInfo != nil { - userInfo, err := s.getUserInfo(ctx, sendID) + userInfo, err = s.getUserInfo(ctx, sendID) if err != nil { log.ZWarn(ctx, "getUserInfo failed", err, "sendID", sendID) } else {