From f3fbe86ca42bdfba9b4193fe18d8389622aeac42 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Mon, 30 May 2022 19:37:54 +0800 Subject: [PATCH] log --- internal/msg_gateway/gate/logic.go | 3 ++- pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/msg_gateway/gate/logic.go b/internal/msg_gateway/gate/logic.go index 45ab91742..e7e54baab 100644 --- a/internal/msg_gateway/gate/logic.go +++ b/internal/msg_gateway/gate/logic.go @@ -103,7 +103,7 @@ func (ws *WServer) getSeqResp(conn *UserConn, m *Req, pb *pbChat.GetMaxAndMinSeq } func (ws *WServer) pullMsgBySeqListReq(conn *UserConn, m *Req) { - log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq start", m.SendID, m.ReqIdentifier, m.MsgIncr, m.Data) + log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq start", m.SendID, m.ReqIdentifier, m.MsgIncr) nReply := new(sdk_ws.PullMessageBySeqListResp) isPass, errCode, errMsg, data := ws.argsValidate(m, constant.WSPullMsgBySeqList) if isPass { @@ -111,6 +111,7 @@ func (ws *WServer) pullMsgBySeqListReq(conn *UserConn, m *Req) { rpcReq.SeqList = data.(sdk_ws.PullMessageBySeqListReq).SeqList rpcReq.UserID = m.SendID rpcReq.OperationID = m.OperationID + rpcReq.GroupSeqList = data.(sdk_ws.PullMessageBySeqListReq).GroupSeqList log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq middle", m.SendID, m.ReqIdentifier, m.MsgIncr, data.(sdk_ws.PullMessageBySeqListReq).SeqList, data.(sdk_ws.PullMessageBySeqListReq).GroupSeqList) grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) msgClient := pbChat.NewChatClient(grpcConn) diff --git a/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go b/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go index 99c099ac4..5f7ef59f7 100644 --- a/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go +++ b/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go @@ -26,7 +26,7 @@ func InsertMessageToChatLog(msg pbMsg.MsgDataToMQ) error { chatLog := new(db.ChatLog) copier.Copy(chatLog, msg.MsgData) switch msg.MsgData.SessionType { - case constant.GroupChatType: + case constant.GroupChatType, constant.SuperGroupChatType: chatLog.RecvID = msg.MsgData.GroupID case constant.SingleChatType: chatLog.RecvID = msg.MsgData.RecvID