diff --git a/cmd/Open-IM-SDK-Core b/cmd/Open-IM-SDK-Core index d6372d6fe..a85c10dbf 160000 --- a/cmd/Open-IM-SDK-Core +++ b/cmd/Open-IM-SDK-Core @@ -1 +1 @@ -Subproject commit d6372d6fe5aeea1a57e5668b510bb6e42a7e49a3 +Subproject commit a85c10dbffbb797b5b2091e209ff67a5534b9bfc diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 7f8fd7db2..817042f5c 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -81,7 +81,6 @@ func main() { chatGroup := r.Group("/msg") { chatGroup.POST("/newest_seq", apiChat.GetSeq) - chatGroup.POST("/pull_msg", apiChat.PullMsg) chatGroup.POST("/send_msg", apiChat.SendMsg) chatGroup.POST("/pull_msg_by_seq", apiChat.PullMsgBySeqList) } diff --git a/internal/api/chat/pull_msg.go b/internal/api/chat/pull_msg.go index 56903f5cc..0872319c6 100644 --- a/internal/api/chat/pull_msg.go +++ b/internal/api/chat/pull_msg.go @@ -23,61 +23,11 @@ type paramsUserPullMsg struct { } } -func PullMsg(c *gin.Context) { - params := paramsUserPullMsg{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - - token := c.Request.Header.Get("token") - if ok, err := token_verify.VerifyToken(token, params.SendID); !ok { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err" + err.Error()}) - return - } - pbData := open_im_sdk.PullMessageReq{} - pbData.UserID = params.SendID - pbData.OperationID = params.OperationID - pbData.SeqBegin = *params.Data.SeqBegin - pbData.SeqEnd = *params.Data.SeqEnd - grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) - msgClient := pbChat.NewChatClient(grpcConn) - reply, err := msgClient.PullMessage(context.Background(), &pbData) - if err != nil { - log.NewError(params.OperationID, "UserPullMsg rpc failed, ", params, err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "UserPullMsg rpc failed, " + err.Error()}) - return - } - log.InfoByKv("rpc call success to pullMsgRep", pbData.OperationID, "ReplyArgs", reply.String(), "maxSeq", reply.GetMaxSeq(), - "MinSeq", reply.GetMinSeq(), "singLen", len(reply.GetSingleUserMsg()), "groupLen", len(reply.GetGroupUserMsg())) - - msg := make(map[string]interface{}) - if v := reply.GetSingleUserMsg(); v != nil { - msg["single"] = v - } else { - msg["single"] = []open_im_sdk.GatherFormat{} - } - if v := reply.GetGroupUserMsg(); v != nil { - msg["group"] = v - } else { - msg["group"] = []open_im_sdk.GatherFormat{} - } - msg["maxSeq"] = reply.GetMaxSeq() - msg["minSeq"] = reply.GetMinSeq() - c.JSON(http.StatusOK, gin.H{ - "errCode": reply.ErrCode, - "errMsg": reply.ErrMsg, - "reqIdentifier": *params.ReqIdentifier, - "data": msg, - }) - -} - type paramsUserPullMsgBySeqList struct { - ReqIdentifier int `json:"reqIdentifier" binding:"required"` - SendID string `json:"sendID" binding:"required"` - OperationID string `json:"operationID" binding:"required"` - SeqList []int64 `json:"seqList"` + ReqIdentifier int `json:"reqIdentifier" binding:"required"` + SendID string `json:"sendID" binding:"required"` + OperationID string `json:"operationID" binding:"required"` + SeqList []uint32 `json:"seqList"` } func PullMsgBySeqList(c *gin.Context) { @@ -104,26 +54,11 @@ func PullMsgBySeqList(c *gin.Context) { log.ErrorByKv("PullMessageBySeqList error", pbData.OperationID, "err", err.Error()) return } - log.InfoByKv("rpc call success to PullMessageBySeqList", pbData.OperationID, "ReplyArgs", reply.String(), "maxSeq", reply.GetMaxSeq(), - "MinSeq", reply.GetMinSeq(), "singLen", len(reply.GetSingleUserMsg()), "groupLen", len(reply.GetGroupUserMsg())) - - msg := make(map[string]interface{}) - if v := reply.GetSingleUserMsg(); v != nil { - msg["single"] = v - } else { - msg["single"] = []open_im_sdk.GatherFormat{} - } - if v := reply.GetGroupUserMsg(); v != nil { - msg["group"] = v - } else { - msg["group"] = []open_im_sdk.GatherFormat{} - } - msg["maxSeq"] = reply.GetMaxSeq() - msg["minSeq"] = reply.GetMinSeq() + log.InfoByKv("rpc call success to PullMessageBySeqList", pbData.OperationID, "ReplyArgs", reply.String(), len(reply.List)) c.JSON(http.StatusOK, gin.H{ "errCode": reply.ErrCode, "errMsg": reply.ErrMsg, "reqIdentifier": params.ReqIdentifier, - "data": msg, + "data": reply.List, }) } diff --git a/internal/msg_gateway/gate/logic.go b/internal/msg_gateway/gate/logic.go index 5fec367aa..d1756093c 100644 --- a/internal/msg_gateway/gate/logic.go +++ b/internal/msg_gateway/gate/logic.go @@ -10,7 +10,6 @@ import ( "bytes" "context" "encoding/gob" - "encoding/json" "github.com/golang/protobuf/proto" "github.com/gorilla/websocket" "runtime" @@ -51,8 +50,6 @@ func (ws *WServer) msgParse(conn *UserConn, binaryMsg []byte) { switch m.ReqIdentifier { case constant.WSGetNewestSeq: ws.getSeqReq(conn, &m) - case constant.WSPullMsg: - ws.pullMsgReq(conn, &m) case constant.WSSendMsg: ws.sendMsgReq(conn, &m) case constant.WSPullMsgBySeqList: @@ -63,24 +60,24 @@ func (ws *WServer) msgParse(conn *UserConn, binaryMsg []byte) { } func (ws *WServer) getSeqReq(conn *UserConn, m *Req) { log.NewInfo(m.OperationID, "Ws call success to getNewSeq", m.MsgIncr, m.SendID, m.ReqIdentifier) - pbData := pbChat.GetMaxAndMinSeqReq{} + rpcReq := pbChat.GetMaxAndMinSeqReq{} nReply := new(pbChat.GetMaxAndMinSeqResp) - pbData.UserID = m.SendID - pbData.OperationID = m.OperationID + rpcReq.UserID = m.SendID + rpcReq.OperationID = m.OperationID grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) if grpcConn == nil { - log.ErrorByKv("get grpcConn err", pbData.OperationID, "args", m) + log.ErrorByKv("get grpcConn err", rpcReq.OperationID, "args", m) } msgClient := pbChat.NewChatClient(grpcConn) - reply, err := msgClient.GetMaxAndMinSeq(context.Background(), &pbData) + rpcReply, err := msgClient.GetMaxAndMinSeq(context.Background(), &rpcReq) if err != nil { - log.ErrorByKv("rpc call failed to getSeqReq", pbData.OperationID, "err", err, "pbData", pbData.String()) - nReply.ErrCode = 200 + log.Error(rpcReq.OperationID, "rpc call failed to getSeqReq", err, rpcReq.String()) + nReply.ErrCode = 500 nReply.ErrMsg = err.Error() ws.getSeqResp(conn, m, nReply) } else { - log.InfoByKv("rpc call success to getSeqReq", pbData.OperationID, "replyData", reply.String()) - ws.getSeqResp(conn, m, reply) + log.InfoByKv("rpc call success to getSeqReq", rpcReq.OperationID, "replyData", rpcReply.String()) + ws.getSeqResp(conn, m, rpcReply) } } func (ws *WServer) getSeqResp(conn *UserConn, m *Req, pb *pbChat.GetMaxAndMinSeqResp) { @@ -98,121 +95,38 @@ func (ws *WServer) getSeqResp(conn *UserConn, m *Req, pb *pbChat.GetMaxAndMinSeq } ws.sendMsg(conn, mReply) } -func (ws *WServer) pullMsgReq(conn *UserConn, m *Req) { - log.NewInfo(m.OperationID, "Ws call success to pullMsgReq", m.ReqIdentifier, m.MsgIncr, m.SendID) - nReply := new(sdk_ws.PullMessageResp) - isPass, errCode, errMsg, data := ws.argsValidate(m, constant.WSPullMsg) - if isPass { - pbData := sdk_ws.PullMessageReq{} - pbData.UserID = m.SendID - pbData.OperationID = m.OperationID - pbData.SeqBegin = data.(SeqData).SeqBegin - pbData.SeqEnd = data.(SeqData).SeqEnd - grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) - msgClient := pbChat.NewChatClient(grpcConn) - reply, err := msgClient.PullMessage(context.Background(), &pbData) - if err != nil { - log.ErrorByKv("PullMessage error", pbData.OperationID, "err", err.Error()) - nReply.ErrCode = 200 - nReply.ErrMsg = err.Error() - ws.pullMsgResp(conn, m, nReply) - } else { - log.InfoByKv("rpc call success to pullMsgRep", pbData.OperationID, "ReplyArgs", reply.String(), "maxSeq", reply.GetMaxSeq(), - "MinSeq", reply.GetMinSeq(), "singLen", len(reply.GetSingleUserMsg()), "groupLen", len(reply.GetGroupUserMsg())) - ws.pullMsgResp(conn, m, reply) - } - } else { - nReply.ErrCode = errCode - nReply.ErrMsg = errMsg - ws.pullMsgResp(conn, m, nReply) - } -} -func (ws *WServer) pullMsgResp(conn *UserConn, m *Req, pb *sdk_ws.PullMessageResp) { - log.NewInfo(m.OperationID, "pullMsgResp come here ", pb.String()) - var mReplyData sdk_ws.PullMessageBySeqListResp - a, err := json.Marshal(pb.SingleUserMsg) - if err != nil { - log.NewError(m.OperationID, "GetSingleUserMsg,json marshal,err", err.Error()) - } - log.NewInfo(m.OperationID, "pullMsgResp json is ", len(pb.SingleUserMsg)) - err = json.Unmarshal(a, &mReplyData.SingleUserMsg) - if err != nil { - log.NewError(m.OperationID, "SingleUserMsg,json Unmarshal,err", err.Error()) - } - b, err := json.Marshal(pb.GroupUserMsg) - if err != nil { - log.NewError(m.OperationID, "mReplyData,json marshal,err", err.Error()) - } - err = json.Unmarshal(b, &mReplyData.GroupUserMsg) - if err != nil { - log.NewError(m.OperationID, "test SingleUserMsg,json Unmarshal,err", err.Error()) - } - c, err := proto.Marshal(&mReplyData) - log.NewInfo(m.OperationID, "test info is ", len(mReplyData.SingleUserMsg), mReplyData.SingleUserMsg) - mReply := Resp{ - ReqIdentifier: m.ReqIdentifier, - MsgIncr: m.MsgIncr, - ErrCode: pb.GetErrCode(), - ErrMsg: pb.GetErrMsg(), - OperationID: m.OperationID, - Data: c, - } - log.NewInfo(m.OperationID, "pullMsgResp all data is ", mReply.ReqIdentifier, mReply.MsgIncr, mReply.ErrCode, mReply.ErrMsg, - len(mReply.Data)) - ws.sendMsg(conn, mReply) -} func (ws *WServer) pullMsgBySeqListReq(conn *UserConn, m *Req) { log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq start", m.SendID, m.ReqIdentifier, m.MsgIncr) - nReply := new(sdk_ws.PullMessageResp) + nReply := new(sdk_ws.PullMessageBySeqListResp) isPass, errCode, errMsg, data := ws.argsValidate(m, constant.WSPullMsgBySeqList) log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq middle", m.SendID, m.ReqIdentifier, m.MsgIncr, data.(sdk_ws.PullMessageBySeqListReq).SeqList) if isPass { - pbData := sdk_ws.PullMessageBySeqListReq{} - pbData.SeqList = data.(sdk_ws.PullMessageBySeqListReq).SeqList - pbData.UserID = m.SendID - pbData.OperationID = m.OperationID + rpcReq := sdk_ws.PullMessageBySeqListReq{} + rpcReq.SeqList = data.(sdk_ws.PullMessageBySeqListReq).SeqList + rpcReq.UserID = m.SendID + rpcReq.OperationID = m.OperationID grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) msgClient := pbChat.NewChatClient(grpcConn) - reply, err := msgClient.PullMessageBySeqList(context.Background(), &pbData) + reply, err := msgClient.PullMessageBySeqList(context.Background(), &rpcReq) if err != nil { - log.NewError(pbData.OperationID, "pullMsgBySeqListReq err", err.Error()) + log.NewError(rpcReq.OperationID, "pullMsgBySeqListReq err", err.Error()) nReply.ErrCode = 200 nReply.ErrMsg = err.Error() - ws.pullMsgResp(conn, m, nReply) + ws.pullMsgBySeqListResp(conn, m, nReply) } else { - log.NewInfo(pbData.OperationID, "rpc call success to pullMsgBySeqListReq", reply.String(), reply.GetMaxSeq(), reply.GetMinSeq(), len(reply.GetSingleUserMsg()), len(reply.GetGroupUserMsg())) + log.NewInfo(rpcReq.OperationID, "rpc call success to pullMsgBySeqListReq", reply.String(), len(reply.List)) ws.pullMsgBySeqListResp(conn, m, reply) } } else { nReply.ErrCode = errCode nReply.ErrMsg = errMsg - ws.pullMsgResp(conn, m, nReply) + ws.pullMsgBySeqListResp(conn, m, nReply) } } func (ws *WServer) pullMsgBySeqListResp(conn *UserConn, m *Req, pb *sdk_ws.PullMessageBySeqListResp) { - log.NewInfo(m.OperationID, "pullMsgResp come here ", pb.String()) - var mReplyData sdk_ws.PullMessageBySeqListResp - a, err := json.Marshal(pb.SingleUserMsg) - if err != nil { - log.NewError(m.OperationID, "GetSingleUserMsg,json marshal,err", err.Error()) - } - log.NewInfo(m.OperationID, "pullMsgResp json is ", len(pb.SingleUserMsg)) - err = json.Unmarshal(a, &mReplyData.SingleUserMsg) - if err != nil { - log.NewError(m.OperationID, "SingleUserMsg,json Unmarshal,err", err.Error()) - } - b, err := json.Marshal(pb.GroupUserMsg) - if err != nil { - log.NewError(m.OperationID, "mReplyData,json marshal,err", err.Error()) - } - err = json.Unmarshal(b, &mReplyData.GroupUserMsg) - if err != nil { - log.NewError(m.OperationID, "test SingleUserMsg,json Unmarshal,err", err.Error()) - } - c, err := proto.Marshal(&mReplyData) - log.NewInfo(m.OperationID, "test info is ", len(mReplyData.SingleUserMsg), mReplyData.SingleUserMsg) - + log.NewInfo(m.OperationID, "pullMsgBySeqListResp come here ", pb.String()) + c, _ := proto.Marshal(pb) mReply := Resp{ ReqIdentifier: m.ReqIdentifier, MsgIncr: m.MsgIncr, @@ -221,7 +135,7 @@ func (ws *WServer) pullMsgBySeqListResp(conn *UserConn, m *Req, pb *sdk_ws.PullM OperationID: m.OperationID, Data: c, } - log.NewInfo(m.OperationID, "pullMsgResp all data is ", mReply.ReqIdentifier, mReply.MsgIncr, mReply.ErrCode, mReply.ErrMsg, + log.NewInfo(m.OperationID, "pullMsgBySeqListResp all data is ", mReply.ReqIdentifier, mReply.MsgIncr, mReply.ErrCode, mReply.ErrMsg, len(mReply.Data)) ws.sendMsg(conn, mReply) diff --git a/internal/msg_gateway/gate/rpc_server.go b/internal/msg_gateway/gate/rpc_server.go index 450cb1c73..240934d3b 100644 --- a/internal/msg_gateway/gate/rpc_server.go +++ b/internal/msg_gateway/gate/rpc_server.go @@ -94,8 +94,8 @@ func (r *RPCServer) OnlinePushMsg(_ context.Context, in *pbRelay.OnlinePushMsgRe } //Single chat sender synchronization message if in.MsgData.GetSessionType() == constant.SingleChatType { - for k, v := range ws.getSingleUserAllConn(recvID) { - _ = sendMsgToUser(v, replyBytes.Bytes(), in, k, recvID) + for k, v := range ws.getSingleUserAllConn(in.MsgData.SendID) { + _ = sendMsgToUser(v, replyBytes.Bytes(), in, k, in.MsgData.SendID) } } if !tag { diff --git a/internal/msg_transfer/logic/db.go b/internal/msg_transfer/logic/db.go index 0c09e0c8e..b9ce8b589 100644 --- a/internal/msg_transfer/logic/db.go +++ b/internal/msg_transfer/logic/db.go @@ -14,7 +14,7 @@ func saveUserChat(uid string, msg *pbMsg.MsgDataToMQ) error { log.NewError(msg.OperationID, "data insert to redis err", err.Error(), msg.String()) return err } - msg.MsgData.Seq = seq + msg.MsgData.Seq = uint32(seq) pbSaveData := pbMsg.MsgDataToDB{} pbSaveData.MsgData = msg.MsgData log.NewInfo(msg.OperationID, "IncrUserSeq cost time", utils.GetCurrentTimestampByMill()-time) diff --git a/internal/push/logic/push_to_client.go b/internal/push/logic/push_to_client.go index 7d566a10a..803bb5b3b 100644 --- a/internal/push/logic/push_to_client.go +++ b/internal/push/logic/push_to_client.go @@ -24,7 +24,7 @@ type OpenIMContent struct { SessionType int `json:"sessionType"` From string `json:"from"` To string `json:"to"` - Seq int64 `json:"seq"` + Seq uint32 `json:"seq"` } type AtContent struct { Text string `json:"text"` diff --git a/internal/rpc/msg/friend_notification.go b/internal/rpc/msg/friend_notification.go index b0377c854..e44bc0ff0 100644 --- a/internal/rpc/msg/friend_notification.go +++ b/internal/rpc/msg/friend_notification.go @@ -101,7 +101,6 @@ func FriendApplicationRejectedNotification(req *pbFriend.AddFriendResponseReq) { } func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) { - return friendAddedTips := open_im_sdk.FriendAddedTips{Friend: &open_im_sdk.FriendInfo{}, OpUser: &open_im_sdk.PublicUserInfo{}} user, err := imdb.GetUserByUserID(opUserID) if err != nil { diff --git a/internal/rpc/msg/group_notification.go b/internal/rpc/msg/group_notification.go index 5893a9781..f9c428d18 100644 --- a/internal/rpc/msg/group_notification.go +++ b/internal/rpc/msg/group_notification.go @@ -218,7 +218,7 @@ func MemberQuitNotification(req *pbGroup.QuitGroupReq) { } groupNotification(constant.MemberQuitNotification, &MemberQuitTips, req.OpUserID, req.GroupID, "", req.OperationID) - groupNotification(constant.MemberQuitNotification, &MemberQuitTips, req.OpUserID, "", req.OpUserID, req.OperationID) + // groupNotification(constant.MemberQuitNotification, &MemberQuitTips, req.OpUserID, "", req.OpUserID, req.OperationID) } diff --git a/internal/rpc/msg/pull_message.go b/internal/rpc/msg/pull_message.go index af619182b..05f1dad39 100644 --- a/internal/rpc/msg/pull_message.go +++ b/internal/rpc/msg/pull_message.go @@ -6,11 +6,8 @@ import ( commonDB "Open_IM/pkg/common/db" "Open_IM/pkg/common/log" - open_im_sdk "Open_IM/pkg/proto/sdk_ws" - "sort" - "strings" - pbMsg "Open_IM/pkg/proto/chat" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" ) func (rpc *rpcChat) GetMaxAndMinSeq(_ context.Context, in *pbMsg.GetMaxAndMinSeqReq) (*pbMsg.GetMaxAndMinSeqResp, error) { @@ -20,125 +17,42 @@ func (rpc *rpcChat) GetMaxAndMinSeq(_ context.Context, in *pbMsg.GetMaxAndMinSeq minSeq, err2 := commonDB.DB.GetUserMinSeq(in.UserID) resp := new(pbMsg.GetMaxAndMinSeqResp) if err1 == nil { - resp.MaxSeq = maxSeq + resp.MaxSeq = uint32(maxSeq) } else if err1 == redis.ErrNil { resp.MaxSeq = 0 } else { log.NewError(in.OperationID, "getMaxSeq from redis error", in.String(), err1.Error()) - resp.MaxSeq = -1 resp.ErrCode = 200 resp.ErrMsg = "redis get err" } if err2 == nil { - resp.MinSeq = minSeq + resp.MinSeq = uint32(minSeq) } else if err2 == redis.ErrNil { resp.MinSeq = 0 } else { log.NewError(in.OperationID, "getMaxSeq from redis error", in.String(), err2.Error()) - resp.MinSeq = -1 resp.ErrCode = 201 resp.ErrMsg = "redis get err" } return resp, nil } -func (rpc *rpcChat) PullMessage(_ context.Context, in *open_im_sdk.PullMessageReq) (*open_im_sdk.PullMessageResp, error) { - log.InfoByKv("rpc pullMessage is arriving", in.OperationID, "args", in.String()) - resp := new(open_im_sdk.PullMessageResp) - var respSingleMsgFormat []*open_im_sdk.GatherFormat - var respGroupMsgFormat []*open_im_sdk.GatherFormat - SingleMsgFormat, GroupMsgFormat, MaxSeq, MinSeq, err := commonDB.DB.GetMsgBySeqRange(in.UserID, in.SeqBegin, in.SeqEnd) - if err != nil { - log.ErrorByKv("pullMsg data error", in.OperationID, in.String()) - resp.ErrCode = 1 - resp.ErrMsg = err.Error() - return resp, nil - } - respSingleMsgFormat = singleMsgHandleByUser(SingleMsgFormat, in.UserID) - respGroupMsgFormat = groupMsgHandleByUser(GroupMsgFormat) - return &open_im_sdk.PullMessageResp{ - ErrCode: 0, - ErrMsg: "", - MaxSeq: MaxSeq, - MinSeq: MinSeq, - SingleUserMsg: respSingleMsgFormat, - GroupUserMsg: respGroupMsgFormat, - }, nil -} func (rpc *rpcChat) PullMessageBySeqList(_ context.Context, in *open_im_sdk.PullMessageBySeqListReq) (*open_im_sdk.PullMessageBySeqListResp, error) { log.NewInfo(in.OperationID, "rpc PullMessageBySeqList is arriving", in.String()) resp := new(open_im_sdk.PullMessageBySeqListResp) - var respSingleMsgFormat []*open_im_sdk.GatherFormat - var respGroupMsgFormat []*open_im_sdk.GatherFormat - SingleMsgFormat, GroupMsgFormat, MaxSeq, MinSeq, err := commonDB.DB.GetMsgBySeqList(in.UserID, in.SeqList) + msgList, err := commonDB.DB.GetMsgBySeqList(in.UserID, in.SeqList, in.OperationID) if err != nil { log.ErrorByKv("PullMessageBySeqList data error", in.OperationID, in.String()) - resp.ErrCode = 1 + resp.ErrCode = 201 resp.ErrMsg = err.Error() return resp, nil } - respSingleMsgFormat = singleMsgHandleByUser(SingleMsgFormat, in.UserID) - respGroupMsgFormat = groupMsgHandleByUser(GroupMsgFormat) - return &open_im_sdk.PullMessageBySeqListResp{ - ErrCode: 0, - ErrMsg: "", - MaxSeq: MaxSeq, - MinSeq: MinSeq, - SingleUserMsg: respSingleMsgFormat, - GroupUserMsg: respGroupMsgFormat, - }, nil -} -func singleMsgHandleByUser(allMsg []*open_im_sdk.MsgData, ownerId string) []*open_im_sdk.GatherFormat { - var userid string - var respMsgFormat []*open_im_sdk.GatherFormat - m := make(map[string]MsgFormats) - //Gather messages in the dimension of users - for _, v := range allMsg { - if v.RecvID != ownerId { - userid = v.RecvID - } else { - userid = v.SendID - } - if value, ok := m[userid]; !ok { - var t MsgFormats - m[userid] = append(t, v) - } else { - m[userid] = append(value, v) - } - } - //Return in pb format - for user, msg := range m { - tempUserMsg := new(open_im_sdk.GatherFormat) - tempUserMsg.Id = user - tempUserMsg.List = msg - sort.Sort(msg) - respMsgFormat = append(respMsgFormat, tempUserMsg) - } - return respMsgFormat -} -func groupMsgHandleByUser(allMsg []*open_im_sdk.MsgData) []*open_im_sdk.GatherFormat { - var respMsgFormat []*open_im_sdk.GatherFormat - m := make(map[string]MsgFormats) - //Gather messages in the dimension of users - for _, v := range allMsg { - //Get group ID - groupID := strings.Split(v.RecvID, " ")[1] - if value, ok := m[groupID]; !ok { - var t MsgFormats - m[groupID] = append(t, v) - } else { - m[groupID] = append(value, v) - } + //respSingleMsgFormat = singleMsgHandleByUser(SingleMsgFormat, in.UserID) + //respGroupMsgFormat = groupMsgHandleByUser(GroupMsgFormat) + resp.ErrCode = 0 + resp.ErrMsg = "" + resp.List = msgList + return resp, nil - } - //Return in pb format - for groupID, msg := range m { - tempUserMsg := new(open_im_sdk.GatherFormat) - tempUserMsg.Id = groupID - tempUserMsg.List = msg - sort.Sort(msg) - respMsgFormat = append(respMsgFormat, tempUserMsg) - } - return respMsgFormat } type MsgFormats []*open_im_sdk.MsgData diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index d6e8c20a1..8b91a3c39 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -210,7 +210,7 @@ func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType i conversationID := utils.GetConversationIDBySessionType(sourceID, sessionType) opt, err := db.DB.GetSingleConversationMsgOpt(userID, conversationID) if err != nil || err != redis.ErrNil { - log.NewError(pb.OperationID, "GetSingleConversationMsgOpt from redis err", pb.String()) + log.NewError(pb.OperationID, "GetSingleConversationMsgOpt from redis err", conversationID, pb.String(), err.Error()) return true } switch opt { diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index a0c451026..147bf2d86 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -80,6 +80,7 @@ func (s *userServer) GetUserInfo(ctx context.Context, req *pbUser.GetUserInfoReq continue } utils.CopyStructFields(&userInfo, user) + userInfo.Birth = uint32(user.Birth.Unix()) userInfoList = append(userInfoList, &userInfo) } } else { diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index cd0c99fae..6e32cea2e 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -18,9 +18,8 @@ const ( //Websocket Protocol WSGetNewestSeq = 1001 - WSPullMsg = 1002 + WSPullMsgBySeqList = 1002 WSSendMsg = 1003 - WSPullMsgBySeqList = 1004 WSPushMsg = 2001 WSKickOnlineMsg = 2002 WSDataError = 3001 diff --git a/pkg/common/db/model_struct.go b/pkg/common/db/model_struct.go index 8dd0ab3a2..eabc26668 100644 --- a/pkg/common/db/model_struct.go +++ b/pkg/common/db/model_struct.go @@ -165,3 +165,22 @@ type Black struct { OperatorUserID string `gorm:"column:operator_user_id;size:64"` Ex string `gorm:"column:ex;size:1024"` } + +type ChatLog struct { + ServerMsgID string `gorm:"column:server_msg_id;primary_key;type:char(64)" json:"serverMsgID"` + ClientMsgID string `gorm:"column:client_msg_id;type:char(64)" json:"clientMsgID"` + SendID string `gorm:"column:send_id;type:char(64)" json:"sendID"` + RecvID string `gorm:"column:recv_id;type:char(64)" json:"recvID"` + SenderPlatformID int32 `gorm:"column:sender_platform_id" json:"senderPlatformID"` + SenderNickname string `gorm:"column:sender_nick_name;type:varchar(255)" json:"senderNickname"` + SenderFaceURL string `gorm:"column:sender_face_url;type:varchar(255)" json:"senderFaceURL"` + SessionType int32 `gorm:"column:session_type" json:"sessionType"` + MsgFrom int32 `gorm:"column:msg_from" json:"msgFrom"` + ContentType int32 `gorm:"column:content_type" json:"contentType"` + Content string `gorm:"column:content;type:varchar(1000)" json:"content"` + Status int32 `gorm:"column:status" json:"status"` + Seq uint32 `gorm:"column:seq;index:index_seq;default:0" json:"seq"` + SendTime time.Time `gorm:"column:send_time" json:"sendTime"` + CreateTime time.Time `gorm:"column:create_time" json:"createTime"` + Ex string `gorm:"column:ex;type:varchar(1024)" json:"ex"` +} diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 128815031..98318dd65 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -2,10 +2,10 @@ package db import ( "Open_IM/pkg/common/config" - "Open_IM/pkg/common/constant" "Open_IM/pkg/common/log" pbMsg "Open_IM/pkg/proto/chat" open_im_sdk "Open_IM/pkg/proto/sdk_ws" + "Open_IM/pkg/utils" "errors" "github.com/garyburd/redigo/redis" "github.com/golang/protobuf/proto" @@ -33,51 +33,8 @@ type GroupMember_x struct { UIDList []string } -func (d *DataBases) GetMsgBySeqRange(uid string, seqBegin, seqEnd int64) (SingleMsg []*open_im_sdk.MsgData, GroupMsg []*open_im_sdk.MsgData, MaxSeq int64, MinSeq int64, err error) { - var count int64 - session := d.mgoSession.Clone() - if session == nil { - return nil, nil, MaxSeq, MinSeq, errors.New("session == nil") - } - defer session.Close() - - c := session.DB(config.Config.Mongo.DBDatabase).C(cChat) - - sChat := UserChat{} - if err = c.Find(bson.M{"uid": uid}).One(&sChat); err != nil { - return nil, nil, MaxSeq, MinSeq, err - } - for i := 0; i < len(sChat.Msg); i++ { - msg := new(open_im_sdk.MsgData) - if err = proto.Unmarshal(sChat.Msg[i].Msg, msg); err != nil { - return nil, nil, MaxSeq, MinSeq, err - } - if msg.Seq >= seqBegin && msg.Seq <= seqEnd { - if msg.Seq > MaxSeq { - MaxSeq = msg.Seq - } - if count == 0 { - MinSeq = msg.Seq - } - if msg.Seq < MinSeq { - MinSeq = msg.Seq - } - if msg.SessionType == constant.SingleChatType { - SingleMsg = append(SingleMsg, msg) - } else { - GroupMsg = append(GroupMsg, msg) - } - count++ - if count == (seqEnd - seqBegin + 1) { - break - } - } - } - - return SingleMsg, GroupMsg, MaxSeq, MinSeq, nil -} -func (d *DataBases) GetMinSeqFromMongo(uid string) (MinSeq int64, err error) { - var i int64 +func (d *DataBases) GetMinSeqFromMongo(uid string) (MinSeq uint32, err error) { + var i, NB uint32 var seqUid string session := d.mgoSession.Clone() if session == nil { @@ -89,7 +46,7 @@ func (d *DataBases) GetMinSeqFromMongo(uid string) (MinSeq int64, err error) { if err != nil && err != redis.ErrNil { return MinSeq, err } - NB := MaxSeq / singleGocMsgNum + NB = uint32(MaxSeq / singleGocMsgNum) for i = 0; i <= NB; i++ { seqUid = indexGen(uid, i) n, err := c.Find(bson.M{"uid": seqUid}).Count() @@ -97,29 +54,28 @@ func (d *DataBases) GetMinSeqFromMongo(uid string) (MinSeq int64, err error) { if i == 0 { MinSeq = 1 } else { - MinSeq = i * singleGocMsgNum + MinSeq = uint32(i * singleGocMsgNum) } break } } return MinSeq, nil } -func (d *DataBases) GetMsgBySeqList(uid string, seqList []int64) (SingleMsg []*open_im_sdk.MsgData, GroupMsg []*open_im_sdk.MsgData, MaxSeq int64, MinSeq int64, err error) { - allCount := 0 +func (d *DataBases) GetMsgBySeqList(uid string, seqList []uint32, operationID string) (seqMsg []*open_im_sdk.MsgData, err error) { + var hasSeqList []uint32 singleCount := 0 session := d.mgoSession.Clone() if session == nil { - return nil, nil, MaxSeq, MinSeq, errors.New("session == nil") + return nil, errors.New("session == nil") } defer session.Close() - c := session.DB(config.Config.Mongo.DBDatabase).C(cChat) - m := func(uid string, seqList []int64) map[string][]int64 { - t := make(map[string][]int64) + m := func(uid string, seqList []uint32) map[string][]uint32 { + t := make(map[string][]uint32) for i := 0; i < len(seqList); i++ { seqUid := getSeqUid(uid, seqList[i]) if value, ok := t[seqUid]; !ok { - var temp []int64 + var temp []uint32 t[seqUid] = append(temp, seqList[i]) } else { t[seqUid] = append(value, seqList[i]) @@ -130,32 +86,19 @@ func (d *DataBases) GetMsgBySeqList(uid string, seqList []int64) (SingleMsg []*o sChat := UserChat{} for seqUid, value := range m { if err = c.Find(bson.M{"uid": seqUid}).One(&sChat); err != nil { - log.NewError("", "not find seqUid", seqUid, value, uid, seqList) + log.NewError(operationID, "not find seqUid", seqUid, value, uid, seqList, err.Error()) continue } singleCount = 0 for i := 0; i < len(sChat.Msg); i++ { msg := new(open_im_sdk.MsgData) if err = proto.Unmarshal(sChat.Msg[i].Msg, msg); err != nil { - log.NewError("", "not find seqUid", seqUid, value, uid, seqList) - return nil, nil, MaxSeq, MinSeq, err + log.NewError(operationID, "Unmarshal err", seqUid, value, uid, seqList, err.Error()) + return nil, err } - if isContainInt64(msg.Seq, value) { - if msg.Seq > MaxSeq { - MaxSeq = msg.Seq - } - if allCount == 0 { - MinSeq = msg.Seq - } - if msg.Seq < MinSeq { - MinSeq = msg.Seq - } - if msg.SessionType == constant.SingleChatType { - SingleMsg = append(SingleMsg, msg) - } else { - GroupMsg = append(GroupMsg, msg) - } - allCount++ + if isContainInt32(msg.Seq, value) { + seqMsg = append(seqMsg, msg) + hasSeqList = append(hasSeqList, msg.Seq) singleCount++ if singleCount == len(value) { break @@ -163,8 +106,24 @@ func (d *DataBases) GetMsgBySeqList(uid string, seqList []int64) (SingleMsg []*o } } } - return SingleMsg, GroupMsg, MaxSeq, MinSeq, nil + if len(hasSeqList) != len(seqList) { + var diff []uint32 + diff = utils.Difference(hasSeqList, seqList) + exceptionMSg := genExceptionMessageBySeqList(diff) + seqMsg = append(seqMsg, exceptionMSg...) + + } + return seqMsg, nil } +func genExceptionMessageBySeqList(seqList []uint32) (exceptionMsg []*open_im_sdk.MsgData) { + for _, v := range seqList { + msg := new(open_im_sdk.MsgData) + msg.Seq = v + exceptionMsg = append(exceptionMsg, msg) + } + return exceptionMsg +} + func (d *DataBases) SaveUserChat(uid string, sendTime int64, m *pbMsg.MsgDataToDB) error { var seqUid string newTime := getCurrentTimestampByMill() @@ -183,7 +142,7 @@ func (d *DataBases) SaveUserChat(uid string, sendTime int64, m *pbMsg.MsgDataToD log.NewDebug("", "find mgo uid cost time", getCurrentTimestampByMill()-newTime) sMsg := MsgInfo{} sMsg.SendTime = sendTime - if sMsg.Msg, err = proto.Marshal(m); err != nil { + if sMsg.Msg, err = proto.Marshal(m.MsgData); err != nil { return err } if n == 0 { @@ -318,11 +277,11 @@ func (d *DataBases) DelGroupMember(groupID, uid string) error { func getCurrentTimestampByMill() int64 { return time.Now().UnixNano() / 1e6 } -func getSeqUid(uid string, seq int64) string { +func getSeqUid(uid string, seq uint32) string { seqSuffix := seq / singleGocMsgNum return indexGen(uid, seqSuffix) } -func isContainInt64(target int64, List []int64) bool { +func isContainInt32(target uint32, List []uint32) bool { for _, element := range List { @@ -333,6 +292,6 @@ func isContainInt64(target int64, List []int64) bool { return false } -func indexGen(uid string, seqSuffix int64) string { - return uid + ":" + strconv.FormatInt(seqSuffix, 10) +func indexGen(uid string, seqSuffix uint32) string { + return uid + ":" + strconv.FormatInt(int64(seqSuffix), 10) } diff --git a/pkg/common/db/mysql.go b/pkg/common/db/mysql.go index 9731a1716..56ca3648c 100644 --- a/pkg/common/db/mysql.go +++ b/pkg/common/db/mysql.go @@ -58,7 +58,7 @@ func initMysqlDB() { &GroupMember{}, &GroupRequest{}, &User{}, - &Black{}) + &Black{}, &ChatLog{}) db.Set("gorm:table_options", "CHARSET=utf8") // 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 5a80e6bb2..96d03a7c7 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 @@ -11,45 +11,24 @@ import ( "Open_IM/pkg/common/db" pbMsg "Open_IM/pkg/proto/chat" "Open_IM/pkg/utils" - "database/sql" - "time" + "github.com/jinzhu/copier" ) -// ChatLog Chat information table structure -type ChatLog struct { - MsgId string `gorm:"primary_key"` // Chat history primary key ID - SendID string `gorm:"column:send_id"` // Send ID - RecvID string `gorm:"column:recv_id"` //Receive ID - SendTime time.Time `gorm:"column:send_time"` // Send time - SessionType int32 `gorm:"column:session_type"` // Session type - ContentType int32 `gorm:"column:content_type"` // Message content type - MsgFrom int32 `gorm:"column:msg_from"` // Source, user, system - Content string `gorm:"column:content"` // Chat content - SenderPlatformID int32 `gorm:"column:sender_platform_id"` //The sender's platform ID - Remark sql.NullString `gorm:"column:remark"` // remark -} - func InsertMessageToChatLog(msg pbMsg.MsgDataToMQ) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - chatLog := ChatLog{ - MsgId: msg.MsgData.ServerMsgID, - SendID: msg.MsgData.SendID, - SendTime: utils.UnixNanoSecondToTime(msg.MsgData.SendTime), - SessionType: msg.MsgData.SessionType, - ContentType: msg.MsgData.ContentType, - MsgFrom: msg.MsgData.MsgFrom, - Content: string(msg.MsgData.Content), - SenderPlatformID: msg.MsgData.SenderPlatformID, - } + chatLog := new(db.ChatLog) + copier.Copy(chatLog, msg.MsgData) switch msg.MsgData.SessionType { case constant.GroupChatType: chatLog.RecvID = msg.MsgData.GroupID case constant.SingleChatType: chatLog.RecvID = msg.MsgData.RecvID } - - return dbConn.Table("chat_log").Create(chatLog).Error + chatLog.Content = string(msg.MsgData.Content) + chatLog.CreateTime = utils.UnixMillSecondToTime(msg.MsgData.CreateTime) + chatLog.SendTime = utils.UnixMillSecondToTime(msg.MsgData.SendTime) + return dbConn.Table("chat_logs").Create(chatLog).Error } diff --git a/pkg/common/db/redisModel.go b/pkg/common/db/redisModel.go index 7364d7e68..a3e2ade8e 100644 --- a/pkg/common/db/redisModel.go +++ b/pkg/common/db/redisModel.go @@ -35,28 +35,28 @@ func (d *DataBases) Exec(cmd string, key interface{}, args ...interface{}) (inte } //Perform seq auto-increment operation of user messages -func (d *DataBases) IncrUserSeq(uid string) (int64, error) { +func (d *DataBases) IncrUserSeq(uid string) (uint64, error) { key := userIncrSeq + uid - return redis.Int64(d.Exec("INCR", key)) + return redis.Uint64(d.Exec("INCR", key)) } //Get the largest Seq -func (d *DataBases) GetUserMaxSeq(uid string) (int64, error) { +func (d *DataBases) GetUserMaxSeq(uid string) (uint64, error) { key := userIncrSeq + uid - return redis.Int64(d.Exec("GET", key)) + return redis.Uint64(d.Exec("GET", key)) } //Set the user's minimum seq -func (d *DataBases) SetUserMinSeq(uid string, minSeq int64) (err error) { +func (d *DataBases) SetUserMinSeq(uid string, minSeq uint32) (err error) { key := userMinSeq + uid _, err = d.Exec("SET", key, minSeq) return err } //Get the smallest Seq -func (d *DataBases) GetUserMinSeq(uid string) (int64, error) { +func (d *DataBases) GetUserMinSeq(uid string) (uint64, error) { key := userMinSeq + uid - return redis.Int64(d.Exec("GET", key)) + return redis.Uint64(d.Exec("GET", key)) } //Store Apple's device token to redis diff --git a/pkg/proto/chat/chat.pb.go b/pkg/proto/chat/chat.pb.go index 2a52e2c37..5d4fd0bec 100644 --- a/pkg/proto/chat/chat.pb.go +++ b/pkg/proto/chat/chat.pb.go @@ -37,7 +37,7 @@ func (m *MsgDataToMQ) Reset() { *m = MsgDataToMQ{} } func (m *MsgDataToMQ) String() string { return proto.CompactTextString(m) } func (*MsgDataToMQ) ProtoMessage() {} func (*MsgDataToMQ) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_1eadc66417ed93b5, []int{0} + return fileDescriptor_chat_68ff093a75fc0634, []int{0} } func (m *MsgDataToMQ) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgDataToMQ.Unmarshal(m, b) @@ -90,7 +90,7 @@ func (m *MsgDataToDB) Reset() { *m = MsgDataToDB{} } func (m *MsgDataToDB) String() string { return proto.CompactTextString(m) } func (*MsgDataToDB) ProtoMessage() {} func (*MsgDataToDB) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_1eadc66417ed93b5, []int{1} + return fileDescriptor_chat_68ff093a75fc0634, []int{1} } func (m *MsgDataToDB) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgDataToDB.Unmarshal(m, b) @@ -136,7 +136,7 @@ func (m *PushMsgDataToMQ) Reset() { *m = PushMsgDataToMQ{} } func (m *PushMsgDataToMQ) String() string { return proto.CompactTextString(m) } func (*PushMsgDataToMQ) ProtoMessage() {} func (*PushMsgDataToMQ) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_1eadc66417ed93b5, []int{2} + return fileDescriptor_chat_68ff093a75fc0634, []int{2} } func (m *PushMsgDataToMQ) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PushMsgDataToMQ.Unmarshal(m, b) @@ -202,7 +202,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_1eadc66417ed93b5, []int{3} + return fileDescriptor_chat_68ff093a75fc0634, []int{3} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -239,8 +239,8 @@ func (m *GetMaxAndMinSeqReq) GetOperationID() string { type GetMaxAndMinSeqResp struct { ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - MaxSeq int64 `protobuf:"varint,3,opt,name=MaxSeq" json:"MaxSeq,omitempty"` - MinSeq int64 `protobuf:"varint,4,opt,name=MinSeq" json:"MinSeq,omitempty"` + MaxSeq uint32 `protobuf:"varint,3,opt,name=MaxSeq" json:"MaxSeq,omitempty"` + MinSeq uint32 `protobuf:"varint,4,opt,name=MinSeq" json:"MinSeq,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -250,7 +250,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_1eadc66417ed93b5, []int{4} + return fileDescriptor_chat_68ff093a75fc0634, []int{4} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -284,14 +284,14 @@ func (m *GetMaxAndMinSeqResp) GetErrMsg() string { return "" } -func (m *GetMaxAndMinSeqResp) GetMaxSeq() int64 { +func (m *GetMaxAndMinSeqResp) GetMaxSeq() uint32 { if m != nil { return m.MaxSeq } return 0 } -func (m *GetMaxAndMinSeqResp) GetMinSeq() int64 { +func (m *GetMaxAndMinSeqResp) GetMinSeq() uint32 { if m != nil { return m.MinSeq } @@ -311,7 +311,7 @@ func (m *SendMsgReq) Reset() { *m = SendMsgReq{} } func (m *SendMsgReq) String() string { return proto.CompactTextString(m) } func (*SendMsgReq) ProtoMessage() {} func (*SendMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_1eadc66417ed93b5, []int{5} + return fileDescriptor_chat_68ff093a75fc0634, []int{5} } func (m *SendMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SendMsgReq.Unmarshal(m, b) @@ -367,7 +367,7 @@ func (m *SendMsgResp) Reset() { *m = SendMsgResp{} } func (m *SendMsgResp) String() string { return proto.CompactTextString(m) } func (*SendMsgResp) ProtoMessage() {} func (*SendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_1eadc66417ed93b5, []int{6} + return fileDescriptor_chat_68ff093a75fc0634, []int{6} } func (m *SendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SendMsgResp.Unmarshal(m, b) @@ -444,7 +444,6 @@ const _ = grpc.SupportPackageIsVersion4 type ChatClient interface { GetMaxAndMinSeq(ctx context.Context, in *GetMaxAndMinSeqReq, opts ...grpc.CallOption) (*GetMaxAndMinSeqResp, error) - PullMessage(ctx context.Context, in *sdk_ws.PullMessageReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageResp, error) PullMessageBySeqList(ctx context.Context, in *sdk_ws.PullMessageBySeqListReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageBySeqListResp, error) SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error) } @@ -466,15 +465,6 @@ func (c *chatClient) GetMaxAndMinSeq(ctx context.Context, in *GetMaxAndMinSeqReq return out, nil } -func (c *chatClient) PullMessage(ctx context.Context, in *sdk_ws.PullMessageReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageResp, error) { - out := new(sdk_ws.PullMessageResp) - err := grpc.Invoke(ctx, "/pbChat.Chat/PullMessage", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *chatClient) PullMessageBySeqList(ctx context.Context, in *sdk_ws.PullMessageBySeqListReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageBySeqListResp, error) { out := new(sdk_ws.PullMessageBySeqListResp) err := grpc.Invoke(ctx, "/pbChat.Chat/PullMessageBySeqList", in, out, c.cc, opts...) @@ -497,7 +487,6 @@ func (c *chatClient) SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.C type ChatServer interface { GetMaxAndMinSeq(context.Context, *GetMaxAndMinSeqReq) (*GetMaxAndMinSeqResp, error) - PullMessage(context.Context, *sdk_ws.PullMessageReq) (*sdk_ws.PullMessageResp, error) PullMessageBySeqList(context.Context, *sdk_ws.PullMessageBySeqListReq) (*sdk_ws.PullMessageBySeqListResp, error) SendMsg(context.Context, *SendMsgReq) (*SendMsgResp, error) } @@ -524,24 +513,6 @@ func _Chat_GetMaxAndMinSeq_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -func _Chat_PullMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(sdk_ws.PullMessageReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChatServer).PullMessage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pbChat.Chat/PullMessage", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChatServer).PullMessage(ctx, req.(*sdk_ws.PullMessageReq)) - } - return interceptor(ctx, in, info, handler) -} - func _Chat_PullMessageBySeqList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(sdk_ws.PullMessageBySeqListReq) if err := dec(in); err != nil { @@ -586,10 +557,6 @@ var _Chat_serviceDesc = grpc.ServiceDesc{ MethodName: "GetMaxAndMinSeq", Handler: _Chat_GetMaxAndMinSeq_Handler, }, - { - MethodName: "PullMessage", - Handler: _Chat_PullMessage_Handler, - }, { MethodName: "PullMessageBySeqList", Handler: _Chat_PullMessageBySeqList_Handler, @@ -603,39 +570,38 @@ var _Chat_serviceDesc = grpc.ServiceDesc{ Metadata: "chat/chat.proto", } -func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_1eadc66417ed93b5) } +func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_68ff093a75fc0634) } -var fileDescriptor_chat_1eadc66417ed93b5 = []byte{ - // 482 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0x95, 0xd3, 0x26, 0xa1, 0x63, 0xa1, 0x48, 0xdb, 0x0a, 0x59, 0xe6, 0x92, 0xfa, 0x54, 0x81, - 0x64, 0x4b, 0x81, 0x1b, 0x27, 0xd2, 0x54, 0x28, 0x88, 0xa5, 0xc5, 0x09, 0x17, 0x2e, 0xd1, 0xb6, - 0x1e, 0x39, 0x56, 0x12, 0x7b, 0xb3, 0xe3, 0x92, 0x02, 0x3f, 0x86, 0x5f, 0xc4, 0x7f, 0x42, 0xde, - 0x75, 0xd2, 0x6d, 0x03, 0x24, 0x27, 0x2e, 0x96, 0xde, 0x9b, 0xe7, 0x37, 0xf3, 0xf6, 0x0b, 0x3a, - 0x37, 0x53, 0x51, 0x46, 0xd5, 0x27, 0x94, 0xaa, 0x28, 0x0b, 0xd6, 0x92, 0xd7, 0xe7, 0x53, 0x51, - 0xfa, 0xa7, 0x97, 0x12, 0xf3, 0xc9, 0x90, 0x47, 0x72, 0x96, 0x46, 0xba, 0x14, 0x51, 0x32, 0x9b, - 0xac, 0x28, 0x5a, 0x91, 0x91, 0x06, 0x3f, 0xc0, 0xe5, 0x94, 0x0e, 0x44, 0x29, 0xc6, 0x05, 0xff, - 0xc4, 0x4e, 0xa0, 0x59, 0x16, 0x33, 0xcc, 0x3d, 0xa7, 0xeb, 0x9c, 0x1d, 0xc5, 0x06, 0xb0, 0x2e, - 0xb8, 0x85, 0x44, 0x25, 0xca, 0xac, 0xc8, 0x87, 0x03, 0xaf, 0xa1, 0x6b, 0x36, 0xc5, 0x5e, 0x43, - 0x7b, 0x61, 0x6c, 0xbc, 0x83, 0xae, 0x73, 0xe6, 0xf6, 0xfc, 0x90, 0x50, 0x7d, 0x45, 0x35, 0x11, - 0x32, 0x9b, 0x48, 0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x96, 0x5e, 0x9b, 0x0d, 0xee, 0xfd, 0x6a, - 0xc0, 0x61, 0x75, 0xc3, 0xd8, 0x7b, 0xe8, 0x3c, 0xda, 0x1f, 0xe6, 0x87, 0xe6, 0xf6, 0x85, 0xdb, - 0x07, 0xc1, 0x7f, 0xfe, 0xd7, 0x1a, 0x49, 0x36, 0x06, 0xf7, 0xea, 0x76, 0x3e, 0xe7, 0x48, 0x24, - 0x52, 0x64, 0xa7, 0x7f, 0x58, 0x2a, 0xab, 0x5e, 0xd9, 0x05, 0xbb, 0x24, 0x24, 0x59, 0x01, 0x27, - 0x16, 0xd5, 0xff, 0x36, 0xc2, 0xe5, 0x87, 0x8c, 0x4a, 0xf6, 0xe2, 0xdf, 0xff, 0x6e, 0x84, 0x55, - 0x9f, 0x97, 0x7b, 0x6b, 0x49, 0xb2, 0x1e, 0xb4, 0xeb, 0xcd, 0x63, 0x6c, 0x1d, 0xf7, 0xfe, 0x28, - 0xf9, 0xc7, 0x5b, 0x1c, 0xc9, 0x7e, 0xe7, 0xcb, 0xd3, 0x50, 0x3f, 0x60, 0x6f, 0x4c, 0xf1, 0xba, - 0xa5, 0x5f, 0xa7, 0x57, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xcb, 0xb4, 0x87, 0x05, 0xdb, 0x04, - 0x00, 0x00, +var fileDescriptor_chat_68ff093a75fc0634 = []byte{ + // 469 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x4f, 0x6f, 0xd3, 0x4e, + 0x10, 0x95, 0xd3, 0x26, 0xf9, 0x75, 0xac, 0x2a, 0xd2, 0xb6, 0xfa, 0xc9, 0x32, 0x17, 0xe3, 0x53, + 0x04, 0x92, 0x2d, 0x05, 0x6e, 0x9c, 0x48, 0x53, 0xa1, 0x20, 0x96, 0x16, 0xa7, 0x5c, 0xb8, 0x44, + 0xdb, 0x7a, 0xe4, 0x58,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3c, 0xb1, 0x66, + 0x4f, 0x35, 0xd6, 0x06, 0x2f, 0xf7, 0xee, 0x25, 0xc9, 0x06, 0xd0, 0x6d, 0x96, 0x99, 0xb1, 0xcd, + 0x60, 0xf7, 0x9b, 0xee, 0x9f, 0xec, 0x70, 0x24, 0x87, 0xbd, 0x2f, 0xc7, 0x91, 0x7e, 0x6a, 0xde, + 0x98, 0xe2, 0x75, 0x47, 0xbf, 0x23, 0xaf, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x3a, 0xe6, 0x81, + 0xce, 0x85, 0x04, 0x00, 0x00, } diff --git a/pkg/proto/chat/chat.proto b/pkg/proto/chat/chat.proto index 12bac416c..7fe50ddc1 100644 --- a/pkg/proto/chat/chat.proto +++ b/pkg/proto/chat/chat.proto @@ -47,41 +47,9 @@ message GetMaxAndMinSeqReq { message GetMaxAndMinSeqResp { int32 ErrCode = 1; string ErrMsg = 2; - int64 MaxSeq = 3; - int64 MinSeq = 4; + uint32 MaxSeq = 3; + uint32 MinSeq = 4; } -//message GatherFormat{ -// // @inject_tag: json:"id" -// string ID = 1; -// // @inject_tag: json:"list" -// repeated MsgFormat List = 2;//detail msg -//} -//message MsgFormat{ -// // @inject_tag: json:"sendID" -// string SendID = 1; -// // @inject_tag: json:"recvID" -// string RecvID = 2; -// // @inject_tag: json:"msgFrom" -// int32 MsgFrom = 3; -// // @inject_tag: json:"contentType" -// int32 ContentType = 4; -// // @inject_tag: json:"serverMsgID" -// string ServerMsgID = 5; -// // @inject_tag: json:"content" -// string Content = 6; -// // @inject_tag: json:"seq" -// int64 Seq = 7; -// // @inject_tag: json:"sendTime" -// int64 SendTime = 8; -// // @inject_tag: json:"senderPlatformID" -// int32 SenderPlatformID = 9; -// // @inject_tag: json:"senderNickName" -// string SenderNickName = 10; -// // @inject_tag: json:"senderFaceUrl" -// string SenderFaceURL = 11; -// // @inject_tag: json:"clientMsgID" -// string ClientMsgID = 12; -//} message SendMsgReq { @@ -102,7 +70,6 @@ message SendMsgResp { } service Chat { rpc GetMaxAndMinSeq(GetMaxAndMinSeqReq) returns(GetMaxAndMinSeqResp); - rpc PullMessage(server_api_params.PullMessageReq) returns(server_api_params.PullMessageResp); rpc PullMessageBySeqList(server_api_params.PullMessageBySeqListReq) returns(server_api_params.PullMessageBySeqListResp); rpc SendMsg(SendMsgReq) returns(SendMsgResp); } diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 5c6263e74..c99165093 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -40,7 +40,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{0} + return fileDescriptor_ws_dd0597f97f3a9074, []int{0} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -164,7 +164,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{1} + return fileDescriptor_ws_dd0597f97f3a9074, []int{1} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -269,7 +269,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{2} + return fileDescriptor_ws_dd0597f97f3a9074, []int{2} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -344,7 +344,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{3} + return fileDescriptor_ws_dd0597f97f3a9074, []int{3} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -451,7 +451,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{4} + return fileDescriptor_ws_dd0597f97f3a9074, []int{4} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -536,7 +536,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{5} + return fileDescriptor_ws_dd0597f97f3a9074, []int{5} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -617,7 +617,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} } func (m *GroupRequest) String() string { return proto.CompactTextString(m) } func (*GroupRequest) ProtoMessage() {} func (*GroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{6} + return fileDescriptor_ws_dd0597f97f3a9074, []int{6} } func (m *GroupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupRequest.Unmarshal(m, b) @@ -725,7 +725,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} } func (m *FriendRequest) String() string { return proto.CompactTextString(m) } func (*FriendRequest) ProtoMessage() {} func (*FriendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{7} + return fileDescriptor_ws_dd0597f97f3a9074, []int{7} } func (m *FriendRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendRequest.Unmarshal(m, b) @@ -851,22 +851,19 @@ func (m *FriendRequest) GetEx() string { } type PullMessageBySeqListResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` - MaxSeq int64 `protobuf:"varint,3,opt,name=maxSeq" json:"maxSeq,omitempty"` - MinSeq int64 `protobuf:"varint,4,opt,name=minSeq" json:"minSeq,omitempty"` - SingleUserMsg []*GatherFormat `protobuf:"bytes,5,rep,name=singleUserMsg" json:"singleUserMsg,omitempty"` - GroupUserMsg []*GatherFormat `protobuf:"bytes,6,rep,name=groupUserMsg" json:"groupUserMsg,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + List []*MsgData `protobuf:"bytes,3,rep,name=list" json:"list,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListResp{} } func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{8} + return fileDescriptor_ws_dd0597f97f3a9074, []int{8} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -900,30 +897,9 @@ func (m *PullMessageBySeqListResp) GetErrMsg() string { return "" } -func (m *PullMessageBySeqListResp) GetMaxSeq() int64 { +func (m *PullMessageBySeqListResp) GetList() []*MsgData { if m != nil { - return m.MaxSeq - } - return 0 -} - -func (m *PullMessageBySeqListResp) GetMinSeq() int64 { - if m != nil { - return m.MinSeq - } - return 0 -} - -func (m *PullMessageBySeqListResp) GetSingleUserMsg() []*GatherFormat { - if m != nil { - return m.SingleUserMsg - } - return nil -} - -func (m *PullMessageBySeqListResp) GetGroupUserMsg() []*GatherFormat { - if m != nil { - return m.GroupUserMsg + return m.List } return nil } @@ -931,7 +907,7 @@ func (m *PullMessageBySeqListResp) GetGroupUserMsg() []*GatherFormat { type PullMessageBySeqListReq struct { UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` - SeqList []int64 `protobuf:"varint,3,rep,packed,name=seqList" json:"seqList,omitempty"` + SeqList []uint32 `protobuf:"varint,3,rep,packed,name=seqList" json:"seqList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -941,7 +917,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{9} + return fileDescriptor_ws_dd0597f97f3a9074, []int{9} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -975,153 +951,13 @@ func (m *PullMessageBySeqListReq) GetOperationID() string { return "" } -func (m *PullMessageBySeqListReq) GetSeqList() []int64 { +func (m *PullMessageBySeqListReq) GetSeqList() []uint32 { if m != nil { return m.SeqList } return nil } -type PullMessageReq struct { - UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` - SeqBegin int64 `protobuf:"varint,2,opt,name=seqBegin" json:"seqBegin,omitempty"` - SeqEnd int64 `protobuf:"varint,3,opt,name=seqEnd" json:"seqEnd,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } -func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } -func (*PullMessageReq) ProtoMessage() {} -func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{10} -} -func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) -} -func (m *PullMessageReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PullMessageReq.Marshal(b, m, deterministic) -} -func (dst *PullMessageReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_PullMessageReq.Merge(dst, src) -} -func (m *PullMessageReq) XXX_Size() int { - return xxx_messageInfo_PullMessageReq.Size(m) -} -func (m *PullMessageReq) XXX_DiscardUnknown() { - xxx_messageInfo_PullMessageReq.DiscardUnknown(m) -} - -var xxx_messageInfo_PullMessageReq proto.InternalMessageInfo - -func (m *PullMessageReq) GetUserID() string { - if m != nil { - return m.UserID - } - return "" -} - -func (m *PullMessageReq) GetSeqBegin() int64 { - if m != nil { - return m.SeqBegin - } - return 0 -} - -func (m *PullMessageReq) GetSeqEnd() int64 { - if m != nil { - return m.SeqEnd - } - return 0 -} - -func (m *PullMessageReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -type PullMessageResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` - MaxSeq int64 `protobuf:"varint,3,opt,name=maxSeq" json:"maxSeq,omitempty"` - MinSeq int64 `protobuf:"varint,4,opt,name=minSeq" json:"minSeq,omitempty"` - SingleUserMsg []*GatherFormat `protobuf:"bytes,5,rep,name=singleUserMsg" json:"singleUserMsg,omitempty"` - GroupUserMsg []*GatherFormat `protobuf:"bytes,6,rep,name=groupUserMsg" json:"groupUserMsg,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } -func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } -func (*PullMessageResp) ProtoMessage() {} -func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{11} -} -func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) -} -func (m *PullMessageResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PullMessageResp.Marshal(b, m, deterministic) -} -func (dst *PullMessageResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_PullMessageResp.Merge(dst, src) -} -func (m *PullMessageResp) XXX_Size() int { - return xxx_messageInfo_PullMessageResp.Size(m) -} -func (m *PullMessageResp) XXX_DiscardUnknown() { - xxx_messageInfo_PullMessageResp.DiscardUnknown(m) -} - -var xxx_messageInfo_PullMessageResp proto.InternalMessageInfo - -func (m *PullMessageResp) GetErrCode() int32 { - if m != nil { - return m.ErrCode - } - return 0 -} - -func (m *PullMessageResp) GetErrMsg() string { - if m != nil { - return m.ErrMsg - } - return "" -} - -func (m *PullMessageResp) GetMaxSeq() int64 { - if m != nil { - return m.MaxSeq - } - return 0 -} - -func (m *PullMessageResp) GetMinSeq() int64 { - if m != nil { - return m.MinSeq - } - return 0 -} - -func (m *PullMessageResp) GetSingleUserMsg() []*GatherFormat { - if m != nil { - return m.SingleUserMsg - } - return nil -} - -func (m *PullMessageResp) GetGroupUserMsg() []*GatherFormat { - if m != nil { - return m.GroupUserMsg - } - return nil -} - type GetMaxAndMinSeqReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1132,7 +968,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{12} + return fileDescriptor_ws_dd0597f97f3a9074, []int{10} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -1153,8 +989,8 @@ func (m *GetMaxAndMinSeqReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetMaxAndMinSeqReq proto.InternalMessageInfo type GetMaxAndMinSeqResp struct { - MaxSeq int64 `protobuf:"varint,1,opt,name=maxSeq" json:"maxSeq,omitempty"` - MinSeq int64 `protobuf:"varint,2,opt,name=minSeq" json:"minSeq,omitempty"` + MaxSeq uint32 `protobuf:"varint,1,opt,name=maxSeq" json:"maxSeq,omitempty"` + MinSeq uint32 `protobuf:"varint,2,opt,name=minSeq" json:"minSeq,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1164,7 +1000,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{13} + return fileDescriptor_ws_dd0597f97f3a9074, []int{11} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -1184,68 +1020,20 @@ func (m *GetMaxAndMinSeqResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetMaxAndMinSeqResp proto.InternalMessageInfo -func (m *GetMaxAndMinSeqResp) GetMaxSeq() int64 { +func (m *GetMaxAndMinSeqResp) GetMaxSeq() uint32 { if m != nil { return m.MaxSeq } return 0 } -func (m *GetMaxAndMinSeqResp) GetMinSeq() int64 { +func (m *GetMaxAndMinSeqResp) GetMinSeq() uint32 { if m != nil { return m.MinSeq } return 0 } -type GatherFormat struct { - // @inject_tag: json:"id" - Id string `protobuf:"bytes,1,opt,name=id" json:"id"` - // @inject_tag: json:"list" - List []*MsgData `protobuf:"bytes,2,rep,name=list" json:"list"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GatherFormat) Reset() { *m = GatherFormat{} } -func (m *GatherFormat) String() string { return proto.CompactTextString(m) } -func (*GatherFormat) ProtoMessage() {} -func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{14} -} -func (m *GatherFormat) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GatherFormat.Unmarshal(m, b) -} -func (m *GatherFormat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GatherFormat.Marshal(b, m, deterministic) -} -func (dst *GatherFormat) XXX_Merge(src proto.Message) { - xxx_messageInfo_GatherFormat.Merge(dst, src) -} -func (m *GatherFormat) XXX_Size() int { - return xxx_messageInfo_GatherFormat.Size(m) -} -func (m *GatherFormat) XXX_DiscardUnknown() { - xxx_messageInfo_GatherFormat.DiscardUnknown(m) -} - -var xxx_messageInfo_GatherFormat proto.InternalMessageInfo - -func (m *GatherFormat) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *GatherFormat) GetList() []*MsgData { - if m != nil { - return m.List - } - return nil -} - type UserSendMsgResp struct { ServerMsgID string `protobuf:"bytes,1,opt,name=serverMsgID" json:"serverMsgID,omitempty"` ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID" json:"clientMsgID,omitempty"` @@ -1259,7 +1047,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{15} + return fileDescriptor_ws_dd0597f97f3a9074, []int{12} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1313,7 +1101,7 @@ type MsgData struct { MsgFrom int32 `protobuf:"varint,10,opt,name=msgFrom" json:"msgFrom,omitempty"` ContentType int32 `protobuf:"varint,11,opt,name=contentType" json:"contentType,omitempty"` Content []byte `protobuf:"bytes,12,opt,name=content,proto3" json:"content,omitempty"` - Seq int64 `protobuf:"varint,14,opt,name=seq" json:"seq,omitempty"` + Seq uint32 `protobuf:"varint,14,opt,name=seq" json:"seq,omitempty"` SendTime int64 `protobuf:"varint,15,opt,name=sendTime" json:"sendTime,omitempty"` CreateTime int64 `protobuf:"varint,16,opt,name=createTime" json:"createTime,omitempty"` Status int32 `protobuf:"varint,17,opt,name=status" json:"status,omitempty"` @@ -1328,7 +1116,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{16} + return fileDescriptor_ws_dd0597f97f3a9074, []int{13} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -1432,7 +1220,7 @@ func (m *MsgData) GetContent() []byte { return nil } -func (m *MsgData) GetSeq() int64 { +func (m *MsgData) GetSeq() uint32 { if m != nil { return m.Seq } @@ -1489,7 +1277,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{17} + return fileDescriptor_ws_dd0597f97f3a9074, []int{14} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -1556,7 +1344,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{18} + return fileDescriptor_ws_dd0597f97f3a9074, []int{15} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1606,7 +1394,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{19} + return fileDescriptor_ws_dd0597f97f3a9074, []int{16} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1675,7 +1463,7 @@ func (m *GroupInfoSetTips) Reset() { *m = GroupInfoSetTips{} } func (m *GroupInfoSetTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoSetTips) ProtoMessage() {} func (*GroupInfoSetTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{20} + return fileDescriptor_ws_dd0597f97f3a9074, []int{17} } func (m *GroupInfoSetTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoSetTips.Unmarshal(m, b) @@ -1730,7 +1518,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } func (*JoinGroupApplicationTips) ProtoMessage() {} func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{21} + return fileDescriptor_ws_dd0597f97f3a9074, []int{18} } func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) @@ -1786,7 +1574,7 @@ func (m *MemberQuitTips) Reset() { *m = MemberQuitTips{} } func (m *MemberQuitTips) String() string { return proto.CompactTextString(m) } func (*MemberQuitTips) ProtoMessage() {} func (*MemberQuitTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{22} + return fileDescriptor_ws_dd0597f97f3a9074, []int{19} } func (m *MemberQuitTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberQuitTips.Unmarshal(m, b) @@ -1841,7 +1629,7 @@ func (m *GroupApplicationAcceptedTips) Reset() { *m = GroupApplicationAc func (m *GroupApplicationAcceptedTips) String() string { return proto.CompactTextString(m) } func (*GroupApplicationAcceptedTips) ProtoMessage() {} func (*GroupApplicationAcceptedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{23} + return fileDescriptor_ws_dd0597f97f3a9074, []int{20} } func (m *GroupApplicationAcceptedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationAcceptedTips.Unmarshal(m, b) @@ -1896,7 +1684,7 @@ func (m *GroupApplicationRejectedTips) Reset() { *m = GroupApplicationRe func (m *GroupApplicationRejectedTips) String() string { return proto.CompactTextString(m) } func (*GroupApplicationRejectedTips) ProtoMessage() {} func (*GroupApplicationRejectedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{24} + return fileDescriptor_ws_dd0597f97f3a9074, []int{21} } func (m *GroupApplicationRejectedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationRejectedTips.Unmarshal(m, b) @@ -1952,7 +1740,7 @@ func (m *GroupOwnerTransferredTips) Reset() { *m = GroupOwnerTransferred func (m *GroupOwnerTransferredTips) String() string { return proto.CompactTextString(m) } func (*GroupOwnerTransferredTips) ProtoMessage() {} func (*GroupOwnerTransferredTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{25} + return fileDescriptor_ws_dd0597f97f3a9074, []int{22} } func (m *GroupOwnerTransferredTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupOwnerTransferredTips.Unmarshal(m, b) @@ -2015,7 +1803,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{26} + return fileDescriptor_ws_dd0597f97f3a9074, []int{23} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -2078,7 +1866,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{27} + return fileDescriptor_ws_dd0597f97f3a9074, []int{24} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -2140,7 +1928,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{28} + return fileDescriptor_ws_dd0597f97f3a9074, []int{25} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -2194,7 +1982,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{29} + return fileDescriptor_ws_dd0597f97f3a9074, []int{26} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -2247,7 +2035,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} } func (m *FromToUserID) String() string { return proto.CompactTextString(m) } func (*FromToUserID) ProtoMessage() {} func (*FromToUserID) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{30} + return fileDescriptor_ws_dd0597f97f3a9074, []int{27} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -2293,7 +2081,7 @@ func (m *FriendApplicationTips) Reset() { *m = FriendApplicationTips{} } func (m *FriendApplicationTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationTips) ProtoMessage() {} func (*FriendApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{31} + return fileDescriptor_ws_dd0597f97f3a9074, []int{28} } func (m *FriendApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationTips.Unmarshal(m, b) @@ -2333,7 +2121,7 @@ func (m *FriendApplicationApprovedTips) Reset() { *m = FriendApplication func (m *FriendApplicationApprovedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationApprovedTips) ProtoMessage() {} func (*FriendApplicationApprovedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{32} + return fileDescriptor_ws_dd0597f97f3a9074, []int{29} } func (m *FriendApplicationApprovedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationApprovedTips.Unmarshal(m, b) @@ -2380,7 +2168,7 @@ func (m *FriendApplicationRejectedTips) Reset() { *m = FriendApplication func (m *FriendApplicationRejectedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationRejectedTips) ProtoMessage() {} func (*FriendApplicationRejectedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{33} + return fileDescriptor_ws_dd0597f97f3a9074, []int{30} } func (m *FriendApplicationRejectedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationRejectedTips.Unmarshal(m, b) @@ -2428,7 +2216,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{34} + return fileDescriptor_ws_dd0597f97f3a9074, []int{31} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2481,7 +2269,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{35} + return fileDescriptor_ws_dd0597f97f3a9074, []int{32} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2519,7 +2307,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{36} + return fileDescriptor_ws_dd0597f97f3a9074, []int{33} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2557,7 +2345,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{37} + return fileDescriptor_ws_dd0597f97f3a9074, []int{34} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2595,7 +2383,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{38} + return fileDescriptor_ws_dd0597f97f3a9074, []int{35} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2634,7 +2422,7 @@ func (m *UserInfoUpdatedTips) Reset() { *m = UserInfoUpdatedTips{} } func (m *UserInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*UserInfoUpdatedTips) ProtoMessage() {} func (*UserInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{39} + return fileDescriptor_ws_dd0597f97f3a9074, []int{36} } func (m *UserInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfoUpdatedTips.Unmarshal(m, b) @@ -2672,11 +2460,8 @@ func init() { proto.RegisterType((*FriendRequest)(nil), "server_api_params.FriendRequest") proto.RegisterType((*PullMessageBySeqListResp)(nil), "server_api_params.PullMessageBySeqListResp") proto.RegisterType((*PullMessageBySeqListReq)(nil), "server_api_params.PullMessageBySeqListReq") - proto.RegisterType((*PullMessageReq)(nil), "server_api_params.PullMessageReq") - proto.RegisterType((*PullMessageResp)(nil), "server_api_params.PullMessageResp") proto.RegisterType((*GetMaxAndMinSeqReq)(nil), "server_api_params.GetMaxAndMinSeqReq") proto.RegisterType((*GetMaxAndMinSeqResp)(nil), "server_api_params.GetMaxAndMinSeqResp") - proto.RegisterType((*GatherFormat)(nil), "server_api_params.GatherFormat") proto.RegisterType((*UserSendMsgResp)(nil), "server_api_params.UserSendMsgResp") proto.RegisterType((*MsgData)(nil), "server_api_params.MsgData") proto.RegisterMapType((map[string]bool)(nil), "server_api_params.MsgData.OptionsEntry") @@ -2705,134 +2490,127 @@ func init() { proto.RegisterType((*UserInfoUpdatedTips)(nil), "server_api_params.UserInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_44bd6efa690189ed) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_dd0597f97f3a9074) } -var fileDescriptor_ws_44bd6efa690189ed = []byte{ - // 2010 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0x4f, 0x6f, 0x23, 0x49, - 0x15, 0x57, 0x77, 0xc7, 0x8e, 0xfd, 0x6c, 0xc7, 0x99, 0x9e, 0x65, 0x30, 0xc3, 0xec, 0x10, 0x5a, - 0xab, 0x25, 0x42, 0x22, 0x48, 0x83, 0x90, 0x60, 0x10, 0xa0, 0xfc, 0x67, 0x96, 0x38, 0x09, 0x9d, - 0x8c, 0x96, 0x03, 0xd2, 0xa8, 0xe3, 0x2e, 0x3b, 0xbd, 0x69, 0x57, 0xb5, 0xab, 0xbb, 0x33, 0x33, - 0x17, 0x0e, 0x70, 0xe1, 0x0b, 0xc0, 0x91, 0x03, 0x17, 0xc4, 0x05, 0x71, 0x41, 0x5c, 0x38, 0xf2, - 0x05, 0x38, 0xf3, 0x15, 0xb8, 0x72, 0x40, 0x42, 0x5a, 0x54, 0xaf, 0xaa, 0xbb, 0xab, 0xda, 0x4e, - 0xd6, 0x8a, 0xa2, 0x1d, 0x24, 0x6e, 0x7e, 0xbf, 0xae, 0xf7, 0xff, 0xd5, 0xab, 0x57, 0x65, 0xe8, - 0xa7, 0xe1, 0xd5, 0xab, 0xd7, 0xe9, 0x37, 0x5f, 0xa7, 0x5b, 0x09, 0x67, 0x19, 0x73, 0x1f, 0xa4, - 0x84, 0x5f, 0x13, 0xfe, 0x2a, 0x48, 0xa2, 0x57, 0x49, 0xc0, 0x83, 0x69, 0xea, 0xfd, 0xcb, 0x86, - 0xf6, 0x21, 0x67, 0x79, 0xf2, 0x82, 0x8e, 0x99, 0x3b, 0x80, 0xd5, 0x09, 0x12, 0x7b, 0x03, 0x6b, - 0xc3, 0xda, 0x6c, 0xfb, 0x05, 0xe9, 0x3e, 0x81, 0x36, 0xfe, 0x3c, 0x0e, 0xa6, 0x64, 0x60, 0xe3, - 0xb7, 0x0a, 0x70, 0x3d, 0xe8, 0x52, 0x96, 0x45, 0xe3, 0x68, 0x14, 0x64, 0x11, 0xa3, 0x03, 0x07, - 0x17, 0x18, 0x98, 0x58, 0x13, 0xd1, 0x8c, 0xb3, 0x30, 0x1f, 0xe1, 0x9a, 0x15, 0xb9, 0x46, 0xc7, - 0x84, 0xfe, 0x71, 0x30, 0x22, 0x2f, 0xfd, 0xa3, 0x41, 0x43, 0xea, 0x57, 0xa4, 0xbb, 0x01, 0x1d, - 0xf6, 0x9a, 0x12, 0xfe, 0x32, 0x25, 0xfc, 0xc5, 0xde, 0xa0, 0x89, 0x5f, 0x75, 0xc8, 0x7d, 0x0a, - 0x30, 0x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 0x46, 0x57, 0x4b, 0xba, 0x6e, 0xba, 0x68, 0xcf, 0xb9, 0x78, 0x08, 0xbd, 0x0b, 0x21, 0xae, 0x70, - 0x01, 0xa3, 0xd0, 0x79, 0xf6, 0xd5, 0x05, 0x5e, 0x9a, 0x9b, 0xc5, 0x37, 0xf9, 0x4c, 0x77, 0x57, - 0x3e, 0xdb, 0xdd, 0xc6, 0x2d, 0xee, 0x36, 0x4b, 0x77, 0xff, 0x6e, 0x43, 0x17, 0xdb, 0x9b, 0x4f, - 0x66, 0x39, 0x49, 0x33, 0xf7, 0xfb, 0xd0, 0xca, 0x0b, 0x53, 0xad, 0x65, 0x4d, 0x2d, 0x59, 0xdc, - 0xe7, 0xaa, 0x99, 0x22, 0xbf, 0x8d, 0xfc, 0x4f, 0x16, 0xf0, 0x97, 0x27, 0x99, 0x5f, 0x2d, 0x17, - 0x07, 0xcf, 0x65, 0x40, 0xc3, 0x98, 0xf8, 0x24, 0xcd, 0xe3, 0x4c, 0xf5, 0x48, 0x03, 0x93, 0x95, - 0x36, 0x1b, 0xa6, 0x13, 0x75, 0x2c, 0x29, 0x4a, 0x44, 0x47, 0xae, 0x13, 0x9f, 0xa4, 0xeb, 0x15, - 0x20, 0x36, 0x2a, 0x27, 0x33, 0xcc, 0x90, 0xdc, 0x56, 0x05, 0x59, 0xe9, 0x54, 0x51, 0x93, 0x85, - 0x60, 0x60, 0x22, 0xc5, 0x92, 0x46, 0x01, 0xf2, 0x3c, 0xd2, 0x90, 0xfa, 0x71, 0xe4, 0xfd, 0xc3, - 0x81, 0x9e, 0xdc, 0x3e, 0x45, 0x50, 0x9f, 0x8a, 0x3a, 0x67, 0x53, 0xa3, 0x8a, 0x34, 0x44, 0x58, - 0x21, 0xa8, 0x63, 0xb3, 0xd1, 0x18, 0x98, 0x28, 0x45, 0x41, 0x1f, 0x18, 0x0d, 0x47, 0x87, 0x0a, - 0x2d, 0x87, 0x7a, 0xe3, 0xd1, 0x10, 0xd1, 0xca, 0x32, 0x66, 0x54, 0x47, 0x49, 0x0b, 0xde, 0x8c, - 0x95, 0xfa, 0x65, 0x7d, 0x68, 0x88, 0x88, 0x6f, 0xc6, 0x0a, 0xdd, 0x32, 0x48, 0x15, 0x20, 0x25, - 0x2b, 0xbd, 0xf2, 0x00, 0x29, 0xe9, 0xb9, 0xac, 0xb6, 0x6f, 0xcd, 0x2a, 0x18, 0x59, 0x35, 0x37, - 0x57, 0x67, 0x6e, 0x73, 0x7d, 0x00, 0x3d, 0x29, 0xa7, 0x28, 0xfa, 0xae, 0x3c, 0xe0, 0x0d, 0xd0, - 0xac, 0x8d, 0x5e, 0xbd, 0x36, 0xcc, 0xec, 0xae, 0xdd, 0x90, 0xdd, 0x7e, 0x99, 0xdd, 0x5f, 0xd9, - 0x30, 0x38, 0xcd, 0xe3, 0x78, 0x48, 0xd2, 0x34, 0x98, 0x90, 0x9d, 0xb7, 0x67, 0x64, 0x76, 0x14, - 0xa5, 0x99, 0x4f, 0xd2, 0x44, 0x14, 0x1a, 0xe1, 0x7c, 0x97, 0x85, 0x04, 0xb3, 0xdc, 0xf0, 0x0b, - 0x52, 0xb8, 0x48, 0x38, 0x17, 0x16, 0xa8, 0x16, 0x29, 0x29, 0x81, 0x4f, 0x83, 0x37, 0x67, 0x64, - 0x86, 0x19, 0x75, 0x7c, 0x45, 0x21, 0x1e, 0x51, 0x81, 0xaf, 0x28, 0x1c, 0x29, 0x77, 0x1f, 0x7a, - 0x69, 0x44, 0x27, 0xb2, 0x38, 0x65, 0xb1, 0x3b, 0x9b, 0x9d, 0x67, 0x5f, 0x59, 0xb4, 0xc9, 0x82, - 0xec, 0x92, 0xf0, 0x03, 0xc6, 0xa7, 0x41, 0xe6, 0x9b, 0x5c, 0xee, 0x2e, 0x74, 0x71, 0xe3, 0x15, - 0x52, 0x9a, 0xcb, 0x49, 0x31, 0x98, 0xbc, 0x29, 0x7c, 0x71, 0x71, 0x24, 0x66, 0x37, 0x1e, 0xa7, - 0xa2, 0xa1, 0x62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 0xd5, 0xae, - 0xb7, 0xd6, 0x85, 0x46, 0x18, 0xc7, 0xc1, 0xe7, 0x60, 0xc4, 0x1f, 0x2c, 0xe8, 0x2b, 0x23, 0xc2, - 0x50, 0xa9, 0xfd, 0x36, 0x34, 0xe5, 0xf3, 0xb6, 0x52, 0xf8, 0xfe, 0x42, 0x85, 0xc5, 0xb3, 0xbc, - 0xaf, 0x16, 0xcf, 0x57, 0xa4, 0xbd, 0x68, 0x0c, 0xfc, 0x6e, 0xd9, 0x01, 0x96, 0x7e, 0x80, 0x56, - 0x0c, 0xde, 0x4f, 0x8b, 0x62, 0xde, 0x23, 0x31, 0xb9, 0xcf, 0x18, 0x79, 0x2f, 0x61, 0x0d, 0xdf, - 0xda, 0xab, 0x18, 0xdc, 0x8b, 0xd8, 0x8f, 0x61, 0x1d, 0xc5, 0xde, 0xbb, 0xbd, 0xe5, 0xee, 0x10, - 0xf1, 0xd9, 0xbd, 0x0c, 0xe8, 0xe4, 0x3e, 0xa5, 0x7f, 0x03, 0x1e, 0x16, 0xb1, 0x7f, 0x99, 0x84, - 0xe5, 0x15, 0xe5, 0x86, 0x47, 0xae, 0x8b, 0x26, 0xfe, 0x57, 0xfc, 0xad, 0xff, 0x06, 0x00, 0x00, - 0xff, 0xff, 0xaf, 0x96, 0xca, 0x38, 0x3e, 0x1e, 0x00, 0x00, +var fileDescriptor_ws_dd0597f97f3a9074 = []byte{ + // 1901 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4f, 0x6f, 0x23, 0x4b, + 0x11, 0xd7, 0xd8, 0xb1, 0x63, 0x97, 0xe3, 0x38, 0x3b, 0xfb, 0x58, 0xcc, 0xb2, 0x6f, 0x09, 0xa3, + 0xa7, 0xc7, 0x0a, 0x89, 0x20, 0x2d, 0x42, 0x82, 0x45, 0x80, 0xb2, 0xc9, 0x26, 0xec, 0x23, 0x4e, + 0xc2,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1a, 0x68, 0x93, 0xcd, 0xf4, 0xf6, 0xa1, 0x75, 0x16, 0x25, 0x62, 0x8f, 0x4d, 0xa7, 0x32, 0x10, + 0x21, 0x49, 0xe5, 0xac, 0xea, 0x60, 0xbc, 0x35, 0x25, 0x53, 0x25, 0x24, 0xe3, 0x20, 0x8b, 0x53, + 0xb9, 0x34, 0x2f, 0x5c, 0x83, 0xe5, 0xfd, 0xbd, 0x06, 0x5b, 0x38, 0x18, 0xec, 0x61, 0x58, 0x43, + 0xc9, 0x74, 0x9f, 0x42, 0x03, 0xcb, 0x4c, 0x0f, 0x23, 0x37, 0x0f, 0x13, 0x6a, 0xa9, 0xfb, 0x23, + 0x68, 0xb2, 0x04, 0x47, 0x4a, 0x35, 0x81, 0x7c, 0x7c, 0x9d, 0x90, 0x7d, 0xa7, 0xf3, 0xb5, 0x94, + 0x7b, 0x00, 0xa0, 0xae, 0x9b, 0x47, 0x65, 0x6b, 0x5e, 0x56, 0x87, 0x21, 0x29, 0xc1, 0x2b, 0xda, + 0xac, 0x71, 0xb1, 0xb3, 0x99, 0xee, 0x31, 0x6c, 0xa2, 0xd9, 0x27, 0xf9, 0x54, 0x89, 0x18, 0x2f, + 0xbf, 0x63, 0x45, 0xda, 0xfb, 0xbd, 0xa3, 0x61, 0x94, 0x5f, 0x87, 0x04, 0xb1, 0x35, 0x20, 0x71, + 0x56, 0x82, 0xe4, 0x21, 0xb4, 0xa6, 0x99, 0x31, 0xe4, 0xd6, 0xfd, 0x82, 0x2e, 0x43, 0x54, 0x5f, + 0x3a, 0x44, 0xde, 0x1f, 0x1c, 0xe8, 0x7f, 0xc2, 0x22, 0x8a, 0x1f, 0x76, 0x93, 0x24, 0xd6, 0xaf, + 0x0f, 0x2b, 0xc7, 0xfc, 0xc7, 0xd0, 0x0e, 0x94, 0x1a, 0x9a, 0xea, 0xb0, 0x2f, 0x31, 0xb8, 0x96, + 0x32, 0xc6, 0x0c, 0x52, 0x37, 0x67, 0x10, 0xef, 0x4f, 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5, 0x15, 0xe5, 0x9a, 0x87, 0x97, 0xf3, 0x26, 0xfe, 0x99, 0xf7, 0x9d, 0xff, + 0x07, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xb7, 0x8c, 0x6a, 0xdf, 0x1b, 0x00, 0x00, } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index cc4c70054..a3f018db3 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -115,61 +115,14 @@ message PullMessageBySeqListResp { message PullMessageBySeqListReq{ string userID = 1; string operationID = 2; - repeated int64 seqList = 3; -} -message PullMessageReq { - string userID = 1; - int64 seqBegin = 2; - int64 seqEnd = 3; - string operationID = 4; -} -message PullMessageResp { - int32 errCode = 1; - string errMsg = 2; - int64 maxSeq = 3; - int64 minSeq = 4; - repeated GatherFormat singleUserMsg = 5; - repeated GatherFormat groupUserMsg = 6; + repeated uint32 seqList = 3; } message GetMaxAndMinSeqReq { } message GetMaxAndMinSeqResp { - int64 maxSeq = 1; - int64 minSeq = 2; + uint32 maxSeq = 1; + uint32 minSeq = 2; } -message GatherFormat{ - // @inject_tag: json:"id" - string id = 1; - // @inject_tag: json:"list" - repeated MsgData list = 2;//detail msg -} -//message MsgFormat{ -// // @inject_tag: json:"sendID" -// string SendID = 1; -// // @inject_tag: json:"recvID" -// string RecvID = 2; -// // @inject_tag: json:"msgFrom" -// int32 MsgFrom = 3; -// // @inject_tag: json:"contentType" -// int32 ContentType = 4; -// // @inject_tag: json:"serverMsgID" -// string ServerMsgID = 5; -// // @inject_tag: json:"content" -// string Content = 6; -// // @inject_tag: json:"seq" -// int64 Seq = 7; -// // @inject_tag: json:"sendTime" -// int64 SendTime = 8; -// // @inject_tag: json:"senderPlatformID" -// int32 SenderPlatformID = 9; -// // @inject_tag: json:"senderNickName" -// string SenderNickName = 10; -// // @inject_tag: json:"senderFaceUrl" -// string SenderFaceURL = 11; -// // @inject_tag: json:"clientMsgID" -// string ClientMsgID = 12; -//} - message UserSendMsgResp { string serverMsgID = 1; @@ -190,7 +143,7 @@ message MsgData { int32 msgFrom = 10; int32 contentType = 11; bytes content = 12; - int64 seq = 14; + uint32 seq = 14; int64 sendTime = 15; int64 createTime = 16; int32 status = 17; diff --git a/pkg/utils/map.go b/pkg/utils/map.go index 05712fe64..fc24cc87d 100644 --- a/pkg/utils/map.go +++ b/pkg/utils/map.go @@ -121,6 +121,9 @@ func GetSwitchFromOptions(Options map[string]bool, key string) (result bool) { } return false } -func SetSwitchFromOptions(Options map[string]bool, key string, value bool) { - Options[key] = value +func SetSwitchFromOptions(options map[string]bool, key string, value bool) { + if options == nil { + options = make(map[string]bool, 5) + } + options[key] = value } diff --git a/pkg/utils/time_format.go b/pkg/utils/time_format.go index 3accd0567..b24d11398 100644 --- a/pkg/utils/time_format.go +++ b/pkg/utils/time_format.go @@ -30,6 +30,9 @@ func UnixSecondToTime(second int64) time.Time { func UnixNanoSecondToTime(nanoSecond int64) time.Time { return time.Unix(0, nanoSecond) } +func UnixMillSecondToTime(millSecond int64) time.Time { + return time.Unix(0, millSecond*1e6) +} //Get the current timestamp by Nano func GetCurrentTimestampByNano() int64 { diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index f175255ab..440d3a993 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -37,3 +37,37 @@ func cleanUpFuncName(funcName string) string { } return funcName[end+1:] } +func Intersect(slice1, slice2 []uint32) []uint32 { + m := make(map[uint32]bool) + n := make([]uint32, 0) + for _, v := range slice1 { + m[v] = true + } + for _, v := range slice2 { + flag, _ := m[v] + if flag { + n = append(n, v) + } + } + return n +} +func Difference(slice1, slice2 []uint32) []uint32 { + m := make(map[uint32]bool) + n := make([]uint32, 0) + inter := Intersect(slice1, slice2) + for _, v := range inter { + m[v] = true + } + for _, v := range slice1 { + if !m[v] { + n = append(n, v) + } + } + + for _, v := range slice2 { + if !m[v] { + n = append(n, v) + } + } + return n +}