pull/236/head
Gordon 3 years ago
parent 74f2d6bea6
commit 0aefab34f1

@ -107,7 +107,7 @@ func (ws *WServer) getSeqResp(conn *UserConn, m *Req, pb *sdk_ws.GetMaxAndMinSeq
} }
func (ws *WServer) pullMsgBySeqListReq(conn *UserConn, m *Req) { 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) nReply := new(sdk_ws.PullMessageBySeqListResp)
isPass, errCode, errMsg, data := ws.argsValidate(m, constant.WSPullMsgBySeqList) isPass, errCode, errMsg, data := ws.argsValidate(m, constant.WSPullMsgBySeqList)
if isPass { if isPass {
@ -115,6 +115,7 @@ func (ws *WServer) pullMsgBySeqListReq(conn *UserConn, m *Req) {
rpcReq.SeqList = data.(sdk_ws.PullMessageBySeqListReq).SeqList rpcReq.SeqList = data.(sdk_ws.PullMessageBySeqListReq).SeqList
rpcReq.UserID = m.SendID rpcReq.UserID = m.SendID
rpcReq.OperationID = m.OperationID 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) 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) grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName)
msgClient := pbChat.NewChatClient(grpcConn) msgClient := pbChat.NewChatClient(grpcConn)

@ -26,7 +26,7 @@ func InsertMessageToChatLog(msg pbMsg.MsgDataToMQ) error {
chatLog := new(db.ChatLog) chatLog := new(db.ChatLog)
copier.Copy(chatLog, msg.MsgData) copier.Copy(chatLog, msg.MsgData)
switch msg.MsgData.SessionType { switch msg.MsgData.SessionType {
case constant.GroupChatType: case constant.GroupChatType, constant.SuperGroupChatType:
chatLog.RecvID = msg.MsgData.GroupID chatLog.RecvID = msg.MsgData.GroupID
case constant.SingleChatType: case constant.SingleChatType:
chatLog.RecvID = msg.MsgData.RecvID chatLog.RecvID = msg.MsgData.RecvID

Loading…
Cancel
Save