diff --git a/internal/rpc/group/g.go b/internal/rpc/group/g.go index 9afde7115..1228a1c15 100644 --- a/internal/rpc/group/g.go +++ b/internal/rpc/group/g.go @@ -5,7 +5,7 @@ import ( relation "Open_IM/pkg/common/db/mysql" "Open_IM/pkg/common/tools" pbGroup "Open_IM/pkg/proto/group" - sdk "Open_IM/pkg/proto/sdk_ws" + sdk_ws "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" "context" "math/big" @@ -40,10 +40,22 @@ func getDBGroupMember(ctx context.Context, groupID, userID string) (dbGroupMembe return dbGroupMember, nil } -func getUsersInfo(ctx context.Context, userIDs []string) ([]*sdk.UserInfo, error) { +func getUsersInfo(ctx context.Context, userIDs []string) ([]*sdk_ws.UserInfo, error) { return nil, nil } +func getUserMap(ctx context.Context, userIDs []string) (map[string]*sdk_ws.UserInfo, error) { + users, err := getUsersInfo(ctx, userIDs) + if err != nil { + return nil, err + } + userMap := make(map[string]*sdk_ws.UserInfo) + for i, user := range users { + userMap[user.UserID] = users[i] + } + return userMap, nil +} + func genGroupID(ctx context.Context, groupID string) string { if groupID != "" { return groupID diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index b7d37c664..a37f7ebe1 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -15,7 +15,6 @@ import ( "Open_IM/pkg/common/token_verify" "Open_IM/pkg/common/tools" "Open_IM/pkg/common/trace_log" - "Open_IM/pkg/common/tracelog" cp "Open_IM/internal/utils" "Open_IM/pkg/getcdv3" @@ -26,13 +25,12 @@ import ( "Open_IM/pkg/utils" "context" "errors" + grpcPrometheus "github.com/grpc-ecosystem/go-grpc-prometheus" "net" "strconv" "strings" "time" - grpcPrometheus "github.com/grpc-ecosystem/go-grpc-prometheus" - "google.golang.org/grpc" "google.golang.org/protobuf/types/known/wrapperspb" "gorm.io/gorm" @@ -260,139 +258,128 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo groupNode.NotificationUpdateTime = group.NotificationUpdateTime.UnixMilli() resp.GroupList = append(resp.GroupList, &groupNode) } - resp.Total = uint32(len(resp.GroupList)) + resp.Total = int32(len(resp.GroupList)) return resp, nil } func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.InviteUserToGroupReq) (*pbGroup.InviteUserToGroupResp, error) { resp := &pbGroup.InviteUserToGroupResp{} - opUserID := tools.OpUserID(ctx) - if err := token_verify.CheckManagerUserID(ctx, opUserID); err != nil { - if err := relation.CheckIsExistGroupMember(ctx, req.GroupID, opUserID); err != nil { - return nil, err - } + if len(req.InvitedUserIDList) == 0 { + return nil, constant.ErrArgs.Wrap("user empty") } - groupInfo, err := (*relation.Group)(nil).Take(ctx, req.GroupID) + if utils.IsDuplicateID(req.InvitedUserIDList) { + return nil, constant.ErrArgs.Wrap("userID duplicate") + } + group, err := s.GroupInterface.TakeGroupByID(ctx, req.GroupID) if err != nil { return nil, err } - if groupInfo.Status == constant.GroupStatusDismissed { - return nil, utils.Wrap(constant.ErrDismissedAlready, "") + if group.Status == constant.GroupStatusDismissed { + return nil, constant.ErrDismissedAlready.Wrap() } - if groupInfo.NeedVerification == constant.AllNeedVerification && - !relation.IsGroupOwnerAdmin(req.GroupID, tools.OpUserID(ctx)) && !token_verify.IsManagerUserID(tools.OpUserID(ctx)) { - joinReq := pbGroup.JoinGroupReq{} - for _, v := range req.InvitedUserIDList { - var groupRequest relation.GroupRequest - groupRequest.UserID = v - groupRequest.GroupID = req.GroupID - groupRequest.JoinSource = constant.JoinByInvitation - groupRequest.InviterUserID = tools.OpUserID(ctx) - err = relation.InsertIntoGroupRequest(groupRequest) - if err != nil { - var resultNode pbGroup.Id2Result - resultNode.Result = -1 - resultNode.UserID = v - resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) - continue - } else { - var resultNode pbGroup.Id2Result - resultNode.Result = 0 - resultNode.UserID = v - resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) - joinReq.GroupID = req.GroupID - resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) - chat.JoinGroupApplicationNotification(ctx, &joinReq) - } - } - return resp, nil - } - if err := s.DelGroupAndUserCache(ctx, req.GroupID, req.InvitedUserIDList); err != nil { + members, err := s.GroupInterface.GetGroupMemberList(ctx, group.GroupID) + if err != nil { return nil, err } - //from User: invite: applicant - //to user: invite: invited - var okUserIDList []string - if groupInfo.GroupType != constant.SuperGroup { - for _, v := range req.InvitedUserIDList { - var resultNode pbGroup.Id2Result - resultNode.UserID = v - resultNode.Result = 0 - toUserInfo, err := relation.GetUserByUserID(v) - if err != nil { - tracelog.SetCtxInfo(ctx, "GetUserByUserID", err, "userID", v) - resultNode.Result = -1 - resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) - continue - } - - if relation.IsExistGroupMember(req.GroupID, v) { - tracelog.SetCtxInfo(ctx, "IsExistGroupMember", err, "groupID", req.GroupID, "userID", v) - resultNode.Result = -1 - resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) - continue - } - var toInsertInfo relation.GroupMember - utils.CopyStructFields(&toInsertInfo, toUserInfo) - toInsertInfo.GroupID = req.GroupID - toInsertInfo.RoleLevel = constant.GroupOrdinaryUsers - toInsertInfo.OperatorUserID = tools.OpUserID(ctx) - toInsertInfo.InviterUserID = tools.OpUserID(ctx) - toInsertInfo.JoinSource = constant.JoinByInvitation - if err := CallbackBeforeMemberJoinGroup(ctx, tools.OperationID(ctx), &toInsertInfo, groupInfo.Ex); err != nil { - return nil, err - } - err = relation.InsertIntoGroupMember(toInsertInfo) - if err != nil { - tracelog.SetCtxInfo(ctx, "InsertIntoGroupMember", err, "args", toInsertInfo) - resultNode.Result = -1 - resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) - continue - } - okUserIDList = append(okUserIDList, v) - err = db.DB.AddGroupMember(req.GroupID, toUserInfo.UserID) - if err != nil { - tracelog.SetCtxInfo(ctx, "AddGroupMember", err, "groupID", req.GroupID, "userID", toUserInfo.UserID) - } - resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) - } - } else { - okUserIDList = req.InvitedUserIDList - if err := db.DB.AddUserToSuperGroup(req.GroupID, req.InvitedUserIDList); err != nil { - return nil, err + memberMap := make(map[string]*relation.GroupMember) + for i, member := range members { + memberMap[member.GroupID] = members[i] + } + for _, userID := range req.InvitedUserIDList { + if _, ok := memberMap[userID]; ok { + return nil, constant.ErrArgs.Wrap("user in group " + userID) } } - - if groupInfo.GroupType != constant.SuperGroup { - chat.MemberInvitedNotification(tools.OperationID(ctx), req.GroupID, tools.OpUserID(ctx), req.Reason, okUserIDList) - } else { - for _, userID := range req.InvitedUserIDList { - if err := rocksCache.DelJoinedSuperGroupIDListFromCache(ctx, userID); err != nil { - tracelog.SetCtxInfo(ctx, "DelJoinedSuperGroupIDListFromCache", err, "userID", userID) + userMap, err := getUserMap(ctx, req.InvitedUserIDList) + if err != nil { + return nil, err + } + for _, userID := range req.InvitedUserIDList { + if _, ok := userMap[userID]; !ok { + return nil, constant.ErrUserIDNotFound.Wrap(userID) + } + } + if group.NeedVerification == constant.AllNeedVerification { + if !token_verify.IsAppManagerUid(ctx) { + opUserID := tools.OpUserID(ctx) + member, ok := memberMap[opUserID] + if ok { + return nil, constant.ErrNoPermission.Wrap("not in group") + } + if !(member.RoleLevel == constant.GroupOwner || member.RoleLevel == constant.GroupAdmin) { + var requests []*relation.GroupRequest + for _, userID := range req.InvitedUserIDList { + requests = append(requests, &relation.GroupRequest{ + UserID: userID, + GroupID: req.GroupID, + JoinSource: constant.JoinByInvitation, + InviterUserID: opUserID, + }) + } + if err := s.GroupInterface.CreateGroupRequest(ctx, requests); err != nil { + return nil, err + } + for _, request := range requests { + chat.JoinGroupApplicationNotification(ctx, &pbGroup.JoinGroupReq{ + GroupID: request.GroupID, + ReqMessage: request.ReqMsg, + JoinSource: request.JoinSource, + InviterUserID: request.InviterUserID, + }) + } + return resp, nil } } - for _, v := range req.InvitedUserIDList { - chat.SuperGroupNotification(tools.OperationID(ctx), v, v) + } + if group.GroupType == constant.SuperGroup { + if err := s.GroupInterface.AddUserToSuperGroup(ctx, req.GroupID, req.InvitedUserIDList); err != nil { + return nil, err } + for _, userID := range req.InvitedUserIDList { + chat.SuperGroupNotification(tools.OperationID(ctx), userID, userID) + } + } else { + var groupMembers []*relation.GroupMember + for _, userID := range req.InvitedUserIDList { + user := userMap[userID] + var member relation.GroupMember + utils.CopyStructFields(&member, user) + member.GroupID = req.GroupID + member.RoleLevel = constant.GroupOrdinaryUsers + member.OperatorUserID = tools.OpUserID(ctx) + member.InviterUserID = tools.OpUserID(ctx) + member.JoinSource = constant.JoinByInvitation + if err := CallbackBeforeMemberJoinGroup(ctx, tools.OperationID(ctx), &member, group.Ex); err != nil { + return nil, err + } + groupMembers = append(groupMembers, &member) + } + if err := s.GroupInterface.CreateGroupMember(ctx, groupMembers); err != nil { + return nil, err + } + chat.MemberInvitedNotification(tools.OperationID(ctx), req.GroupID, tools.OpUserID(ctx), req.Reason, req.InvitedUserIDList) } return resp, nil } func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGroupAllMemberReq) (*pbGroup.GetGroupAllMemberResp, error) { resp := &pbGroup.GetGroupAllMemberResp{} - - groupInfo, err := rocksCache.GetGroupInfoFromCache(ctx, req.GroupID) + group, err := s.GroupInterface.TakeGroupByID(ctx, req.GroupID) if err != nil { return nil, err } - if groupInfo.GroupType != constant.SuperGroup { - memberList, err := rocksCache.GetGroupMembersInfoFromCache(ctx, req.Count, req.Offset, req.GroupID) + if group.GroupType != constant.SuperGroup { + members, err := s.GroupInterface.GetGroupMemberList(ctx, req.GroupID) if err != nil { return nil, err } - for _, v := range memberList { + var userIDs []string + for _, member := range members { + userIDs = append(userIDs, member.UserID) + } + for _, member := range members { var node open_im_sdk.GroupMemberFullInfo - cp.GroupMemberDBCopyOpenIM(&node, v) + utils.CopyStructFields(&node, member) resp.MemberList = append(resp.MemberList, &node) } } @@ -401,12 +388,10 @@ func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGro func (s *groupServer) GetGroupMemberList(ctx context.Context, req *pbGroup.GetGroupMemberListReq) (*pbGroup.GetGroupMemberListResp, error) { resp := &pbGroup.GetGroupMemberListResp{} - - memberList, err := relation.GetGroupMemberByGroupID(req.GroupID, req.Filter, req.NextSeq, 30) + memberList, err := s.GroupInterface.GetGroupMemberFilterList(ctx, req.GroupID, req.Filter, req.NextSeq, 30) if err != nil { return nil, err } - for _, v := range memberList { var node open_im_sdk.GroupMemberFullInfo utils.CopyStructFields(&node, &v) @@ -481,23 +466,23 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou kickedInfo, err := rocksCache.GetGroupMemberInfoFromCache(ctx, req.GroupID, v) if err != nil { resp.Id2ResultList = append(resp.Id2ResultList, &pbGroup.Id2Result{UserID: v, Result: -1}) - tracelog.SetCtxInfo(ctx, "GetGroupMemberInfoFromCache", err, "groupID", req.GroupID, "userID", v) + trace_log.SetCtxInfo(ctx, "GetGroupMemberInfoFromCache", err, "groupID", req.GroupID, "userID", v) continue } if kickedInfo.RoleLevel == constant.GroupAdmin && opFlag == 3 { resp.Id2ResultList = append(resp.Id2ResultList, &pbGroup.Id2Result{UserID: v, Result: -1}) - tracelog.SetCtxInfo(ctx, "", nil, "msg", "is constant.GroupAdmin, can't kicked", "groupID", req.GroupID, "userID", v) + trace_log.SetCtxInfo(ctx, "", nil, "msg", "is constant.GroupAdmin, can't kicked", "groupID", req.GroupID, "userID", v) continue } if kickedInfo.RoleLevel == constant.GroupOwner && opFlag != 1 { resp.Id2ResultList = append(resp.Id2ResultList, &pbGroup.Id2Result{UserID: v, Result: -1}) - tracelog.SetCtxInfo(ctx, "", nil, "msg", "is constant.GroupOwner, can't kicked", "groupID", req.GroupID, "userID", v) + trace_log.SetCtxInfo(ctx, "", nil, "msg", "is constant.GroupOwner, can't kicked", "groupID", req.GroupID, "userID", v) continue } err = relation.DeleteGroupMemberByGroupIDAndUserID(req.GroupID, v) - tracelog.SetCtxInfo(ctx, "RemoveGroupMember", err, "groupID", req.GroupID, "userID", v) + trace_log.SetCtxInfo(ctx, "RemoveGroupMember", err, "groupID", req.GroupID, "userID", v) if err != nil { log.NewError(tools.OperationID(ctx), "RemoveGroupMember failed ", err.Error(), req.GroupID, v) resp.Id2ResultList = append(resp.Id2ResultList, &pbGroup.Id2Result{UserID: v, Result: -1}) @@ -522,7 +507,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou } client := pbUser.NewUserClient(etcdConn) respPb, err := client.SetConversation(context.Background(), &reqPb) - tracelog.SetCtxInfo(ctx, "SetConversation", err, "req", &reqPb, "resp", respPb) + trace_log.SetCtxInfo(ctx, "SetConversation", err, "req", &reqPb, "resp", respPb) } } else { okUserIDList = req.KickedUserIDList @@ -534,14 +519,14 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou if groupInfo.GroupType != constant.SuperGroup { for _, userID := range okUserIDList { if err := rocksCache.DelGroupMemberInfoFromCache(ctx, req.GroupID, userID); err != nil { - tracelog.SetCtxInfo(ctx, "DelGroupMemberInfoFromCache", err, "groupID", req.GroupID, "userID", userID) + trace_log.SetCtxInfo(ctx, "DelGroupMemberInfoFromCache", err, "groupID", req.GroupID, "userID", userID) } } chat.MemberKickedNotification(req, okUserIDList) } else { for _, userID := range okUserIDList { if err = rocksCache.DelJoinedSuperGroupIDListFromCache(ctx, userID); err != nil { - tracelog.SetCtxInfo(ctx, "DelGroupMemberInfoFromCache", err, "userID", userID) + trace_log.SetCtxInfo(ctx, "DelGroupMemberInfoFromCache", err, "userID", userID) } } go func() { @@ -556,15 +541,14 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetGroupMembersInfoReq) (*pbGroup.GetGroupMembersInfoResp, error) { resp := &pbGroup.GetGroupMembersInfoResp{} - resp.MemberList = []*open_im_sdk.GroupMemberFullInfo{} - for _, userID := range req.MemberList { - groupMember, err := rocksCache.GetGroupMemberInfoFromCache(ctx, req.GroupID, userID) - if err != nil { - return nil, err - } + members, err := s.GroupInterface.GetGroupMemberListByUserID(ctx, req.GroupID, req.MemberList) + if err != nil { + return nil, err + } + for _, member := range members { var memberNode open_im_sdk.GroupMemberFullInfo - utils.CopyStructFields(&memberNode, groupMember) - memberNode.JoinTime = int32(groupMember.JoinTime.Unix()) + utils.CopyStructFields(&memberNode, member) + memberNode.JoinTime = member.JoinTime.UnixMilli() resp.MemberList = append(resp.MemberList, &memberNode) } return resp, nil @@ -600,7 +584,7 @@ func (s *groupServer) GetGroupApplicationList(ctx context.Context, req *pbGroup. return nil, err } var errResult error - tracelog.SetCtxInfo(ctx, "GetRecvGroupApplicationList", nil, " FromUserID: ", req.FromUserID, "GroupApplicationList: ", reply) + trace_log.SetCtxInfo(ctx, "GetRecvGroupApplicationList", nil, " FromUserID: ", req.FromUserID, "GroupApplicationList: ", reply) for _, v := range reply { node := open_im_sdk.GroupRequest{UserInfo: &open_im_sdk.PublicUserInfo{}, GroupInfo: &open_im_sdk.GroupInfo{}} err := FillGroupInfoByGroupID(tools.OperationID(ctx), v.GroupID, node.GroupInfo) @@ -610,7 +594,7 @@ func (s *groupServer) GetGroupApplicationList(ctx context.Context, req *pbGroup. } continue } - tracelog.SetCtxInfo(ctx, "FillGroupInfoByGroupID ", nil, " groupID: ", v.GroupID, " groupInfo: ", node.GroupInfo) + trace_log.SetCtxInfo(ctx, "FillGroupInfoByGroupID ", nil, " groupID: ", v.GroupID, " groupInfo: ", node.GroupInfo) err = FillPublicUserInfoByUserID(tools.OperationID(ctx), v.UserID, node.UserInfo) if err != nil { errResult = err @@ -622,7 +606,7 @@ func (s *groupServer) GetGroupApplicationList(ctx context.Context, req *pbGroup. if errResult != nil && len(resp.GroupRequestList) == 0 { return nil, err } - tracelog.SetRpcRespInfo(ctx, utils.GetSelfFuncName(), resp.String()) + trace_log.SetRpcRespInfo(ctx, utils.GetSelfFuncName(), resp.String()) return resp, nil } @@ -645,7 +629,7 @@ func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsI func CheckPermission(ctx context.Context, groupID string, userID string) (err error) { defer func() { - tracelog.SetCtxInfo(ctx, utils.GetSelfFuncName(), err, "groupID", groupID, "userID", userID) + trace_log.SetCtxInfo(ctx, utils.GetSelfFuncName(), err, "groupID", groupID, "userID", userID) }() if !token_verify.IsManagerUserID(userID) && !relation.IsGroupOwnerAdmin(groupID, userID) { return utils.Wrap(constant.ErrNoPermission, utils.GetSelfFuncName()) @@ -765,7 +749,7 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) } client := pbUser.NewUserClient(etcdConn) respPb, err := client.SetConversation(context.Background(), &reqPb) - tracelog.SetCtxInfo(ctx, "SetConversation", err, "req", reqPb, "resp", respPb) + trace_log.SetCtxInfo(ctx, "SetConversation", err, "req", reqPb, "resp", respPb) chat.MemberEnterDirectlyNotification(req.GroupID, tools.OpUserID(ctx), tools.OperationID(ctx)) return resp, nil } else { @@ -933,7 +917,7 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf } nClient := pbConversation.NewConversationClient(nEtcdConn) conversationReply, err := nClient.ModifyConversationField(context.Background(), &conversationReq) - tracelog.SetCtxInfo(ctx, "ModifyConversationField", err, "req", &conversationReq, "resp", conversationReply) + trace_log.SetCtxInfo(ctx, "ModifyConversationField", err, "req", &conversationReq, "resp", conversationReply) } return resp, nil } @@ -1006,14 +990,14 @@ func (s *groupServer) GetGroups(ctx context.Context, req *pbGroup.GetGroupsReq) } else { groups, count, err := relation.GetGroupsByName(req.GroupName, req.Pagination.PageNumber, req.Pagination.ShowNumber) if err != nil { - tracelog.SetCtxInfo(ctx, "GetGroupsByName", err, "GroupName", req.GroupName, "PageNumber", req.Pagination.PageNumber, "ShowNumber", req.Pagination.ShowNumber) + trace_log.SetCtxInfo(ctx, "GetGroupsByName", err, "GroupName", req.GroupName, "PageNumber", req.Pagination.PageNumber, "ShowNumber", req.Pagination.ShowNumber) } for _, v := range groups { group := &pbGroup.CMSGroup{GroupInfo: &open_im_sdk.GroupInfo{}} utils.CopyStructFields(group.GroupInfo, v) groupMember, err := relation.GetGroupOwnerInfoByGroupID(v.GroupID) if err != nil { - tracelog.SetCtxInfo(ctx, "GetGroupOwnerInfoByGroupID", err, "GroupID", v.GroupID) + trace_log.SetCtxInfo(ctx, "GetGroupOwnerInfoByGroupID", err, "GroupID", v.GroupID) continue } group.GroupInfo.CreateTime = uint32(v.CreateTime.Unix()) @@ -1062,12 +1046,12 @@ func (s *groupServer) GetUserReqApplicationList(ctx context.Context, req *pbGrou node := open_im_sdk.GroupRequest{UserInfo: &open_im_sdk.PublicUserInfo{}, GroupInfo: &open_im_sdk.GroupInfo{}} group, err := relation.GetGroupInfoByGroupID(groupReq.GroupID) if err != nil { - tracelog.SetCtxInfo(ctx, "GetGroupInfoByGroupID", err, "GroupID", groupReq.GroupID) + trace_log.SetCtxInfo(ctx, "GetGroupInfoByGroupID", err, "GroupID", groupReq.GroupID) continue } user, err := relation.GetUserByUserID(groupReq.UserID) if err != nil { - tracelog.SetCtxInfo(ctx, "GetUserByUserID", err, "UserID", groupReq.UserID) + trace_log.SetCtxInfo(ctx, "GetUserByUserID", err, "UserID", groupReq.UserID) continue } cp.GroupRequestDBCopyOpenIM(&node, &groupReq) @@ -1103,7 +1087,7 @@ func (s *groupServer) DismissGroup(ctx context.Context, req *pbGroup.DismissGrou if groupInfo.GroupType != constant.SuperGroup { memberList, err := relation.GetGroupMemberListByGroupID(req.GroupID) if err != nil { - tracelog.SetCtxInfo(ctx, "GetGroupMemberListByGroupID", err, "groupID", req.GroupID) + trace_log.SetCtxInfo(ctx, "GetGroupMemberListByGroupID", err, "groupID", req.GroupID) } //modify quitter conversation info var reqPb pbUser.SetConversationReq @@ -1119,7 +1103,7 @@ func (s *groupServer) DismissGroup(ctx context.Context, req *pbGroup.DismissGrou etcdConn, err := getcdv3.GetConn(ctx, config.Config.RpcRegisterName.OpenImUserName) client := pbUser.NewUserClient(etcdConn) respPb, err := client.SetConversation(context.Background(), &reqPb) - tracelog.SetCtxInfo(ctx, "SetConversation", err, "req", &reqPb, "resp", respPb) + trace_log.SetCtxInfo(ctx, "SetConversation", err, "req", &reqPb, "resp", respPb) } err = relation.DeleteGroupMemberByGroupID(req.GroupID) if err != nil { @@ -1382,7 +1366,7 @@ func (s *groupServer) GetGroupAbstractInfo(ctx context.Context, req *pbGroup.Get } func (s *groupServer) DelGroupAndUserCache(ctx context.Context, groupID string, userIDList []string) error { - operationID := tracelog.GetOperationID(ctx) + operationID := trace_log.GetOperationID(ctx) if groupID != "" { etcdConn, err := getcdv3.GetConn(ctx, config.Config.RpcRegisterName.OpenImCacheName) if err != nil { diff --git a/internal/rpc/msg/friend_notification.go b/internal/rpc/msg/friend_notification.go index 1755c2d78..b453442fb 100644 --- a/internal/rpc/msg/friend_notification.go +++ b/internal/rpc/msg/friend_notification.go @@ -25,13 +25,13 @@ func getFromToUserNickname(fromUserID, toUserID string) (string, string, error) return from.Nickname, to.Nickname, nil } -func friendNotification(commID *pbFriend.CommID, contentType int32, m proto.Message) { - log.Info(commID.OperationID, utils.GetSelfFuncName(), "args: ", commID, contentType) +func friendNotification(operationID, fromUserID, toUserID string, contentType int32, m proto.Message) { + log.Info(operationID, utils.GetSelfFuncName(), "args: ", commID, contentType) var err error var tips open_im_sdk.TipsComm tips.Detail, err = proto.Marshal(m) if err != nil { - log.Error(commID.OperationID, "Marshal failed ", err.Error(), m.String()) + log.Error(operationID, "Marshal failed ", err.Error(), m.String()) return } @@ -43,9 +43,9 @@ func friendNotification(commID *pbFriend.CommID, contentType int32, m proto.Mess tips.JsonDetail, _ = marshaler.MarshalToString(m) - fromUserNickname, toUserNickname, err := getFromToUserNickname(commID.FromUserID, commID.ToUserID) + fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID) if err != nil { - log.Error(commID.OperationID, "getFromToUserNickname failed ", err.Error(), commID.FromUserID, commID.ToUserID) + log.Error(operationID, "getFromToUserNickname failed ", err.Error(), fromUserID, toUserID) return } cn := config.Config.Notification @@ -71,20 +71,20 @@ func friendNotification(commID *pbFriend.CommID, contentType int32, m proto.Mess case constant.FriendInfoUpdatedNotification: tips.DefaultTips = cn.FriendInfoUpdated.DefaultTips.Tips + toUserNickname default: - log.Error(commID.OperationID, "contentType failed ", contentType) + log.Error(operationID, "contentType failed ", contentType) return } var n NotificationMsg - n.SendID = commID.FromUserID - n.RecvID = commID.ToUserID + n.SendID = fromUserID + n.RecvID = toUserID n.ContentType = contentType n.SessionType = constant.SingleChatType n.MsgFrom = constant.SysMsgType - n.OperationID = commID.OperationID + n.OperationID = operationID n.Content, err = proto.Marshal(&tips) if err != nil { - log.Error(commID.OperationID, "Marshal failed ", err.Error(), tips.String()) + log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) return } Notification(&n) @@ -160,7 +160,7 @@ func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { friendNotification(req.CommID, constant.BlackDeletedNotification, &blackDeletedTips) } -//send to myself +// send to myself func UserInfoUpdatedNotification(operationID, opUserID string, changedUserID string) { selfInfoUpdatedTips := open_im_sdk.UserInfoUpdatedTips{UserID: changedUserID} commID := pbFriend.CommID{FromUserID: opUserID, ToUserID: changedUserID, OpUserID: opUserID, OperationID: operationID} @@ -169,6 +169,5 @@ func UserInfoUpdatedNotification(operationID, opUserID string, changedUserID str func FriendInfoUpdatedNotification(operationID, changedUserID string, needNotifiedUserID string, opUserID string) { selfInfoUpdatedTips := open_im_sdk.UserInfoUpdatedTips{UserID: changedUserID} - commID := pbFriend.CommID{FromUserID: opUserID, ToUserID: needNotifiedUserID, OpUserID: opUserID, OperationID: operationID} - friendNotification(&commID, constant.FriendInfoUpdatedNotification, &selfInfoUpdatedTips) + friendNotification(operationID, opUserID, needNotifiedUserID, constant.FriendInfoUpdatedNotification, &selfInfoUpdatedTips) } diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 56522a9a2..6edb04f42 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -11,13 +11,12 @@ import ( "Open_IM/pkg/common/token_verify" "Open_IM/pkg/common/tools" "Open_IM/pkg/getcdv3" - pbConversation "Open_IM/pkg/proto/conversation" pbFriend "Open_IM/pkg/proto/friend" - sdkws "Open_IM/pkg/proto/sdk_ws" + pbGroup "Open_IM/pkg/proto/group" pbUser "Open_IM/pkg/proto/user" "Open_IM/pkg/utils" "context" - "errors" + "github.com/golang/protobuf/ptypes/wrappers" "net" "strconv" "strings" @@ -26,7 +25,6 @@ import ( utils2 "Open_IM/internal/utils" "google.golang.org/grpc" - "gorm.io/gorm" ) type userServer struct { @@ -62,7 +60,7 @@ func NewUserServer(port int) *userServer { } func (s *userServer) Run() { - log.NewInfo("0", "rpc user start...") + log.NewInfo("", "rpc user start...") listenIP := "" if config.Config.ListenIP == "" { @@ -77,7 +75,7 @@ func (s *userServer) Run() { if err != nil { panic("listening err:" + err.Error() + s.rpcRegisterName) } - log.NewInfo("0", "listen network success, address ", address, listener) + log.NewInfo("", "listen network success, address ", address, listener) defer listener.Close() //grpc server var grpcOpts []grpc.ServerOption @@ -102,327 +100,70 @@ func (s *userServer) Run() { log.Error("", "GetLocalIP failed ", err.Error()) } } - err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), rpcRegisterIP, s.rpcPort, s.rpcRegisterName, 10) + err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), rpcRegisterIP, s.rpcPort, s.rpcRegisterName, 10, "") if err != nil { - log.NewError("0", "RegisterEtcd failed ", err.Error(), s.etcdSchema, strings.Join(s.etcdAddr, ","), rpcRegisterIP, s.rpcPort, s.rpcRegisterName) + log.NewError("", "RegisterEtcd failed ", err.Error(), s.etcdSchema, strings.Join(s.etcdAddr, ","), rpcRegisterIP, s.rpcPort, s.rpcRegisterName) panic(utils.Wrap(err, "register user module rpc to etcd err")) } err = srv.Serve(listener) if err != nil { - log.NewError("0", "Serve failed ", err.Error()) + log.NewError("", "Serve failed ", err.Error()) return } - log.NewInfo("0", "rpc user success") + log.NewInfo("", "rpc user success") } -func syncPeerUserConversation(conversation *pbConversation.Conversation, operationID string) error { - peerUserConversation := imdb.Conversation{ - OwnerUserID: conversation.UserID, - ConversationID: utils.GetConversationIDBySessionType(conversation.OwnerUserID, constant.SingleChatType), - ConversationType: constant.SingleChatType, - UserID: conversation.OwnerUserID, - GroupID: "", - RecvMsgOpt: 0, - UnreadCount: 0, - DraftTextTime: 0, - IsPinned: false, - IsPrivateChat: conversation.IsPrivateChat, - AttachedInfo: "", - Ex: "", - } - err := imdb.PeerUserSetConversation(peerUserConversation) +func (s *userServer) SyncJoinedGroupMemberFaceURL(ctx context.Context, userID string, faceURL string, operationID string, opUserID string) { + etcdConn, err := getcdv3.GetConn(ctx, config.Config.RpcRegisterName.OpenImFriendName) if err != nil { - log.NewError(operationID, utils.GetSelfFuncName(), "SetConversation error", err.Error()) - return err - } - chat.ConversationSetPrivateNotification(operationID, conversation.OwnerUserID, conversation.UserID, conversation.IsPrivateChat) - return nil -} - -func (s *userServer) BatchSetConversations(ctx context.Context, req *pbUser.BatchSetConversationsReq) (*pbUser.BatchSetConversationsResp, error) { - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String()) - if req.NotificationType == 0 { - req.NotificationType = constant.ConversationOptChangeNotification - } - resp := &pbUser.BatchSetConversationsResp{} - for _, v := range req.Conversations { - conversation := imdb.Conversation{} - if err := utils.CopyStructFields(&conversation, v); err != nil { - log.NewDebug(req.OperationID, utils.GetSelfFuncName(), v.String(), "CopyStructFields failed", err.Error()) - } - //redis op - if err := db.DB.SetSingleConversationRecvMsgOpt(req.OwnerUserID, v.ConversationID, v.RecvMsgOpt); err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "cache failed, rpc return", err.Error()) - resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg} - return resp, nil - } - - isUpdate, err := imdb.SetConversation(conversation) - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetConversation error", err.Error()) - resp.Failed = append(resp.Failed, v.ConversationID) - continue - } - if isUpdate { - err = rocksCache.DelConversationFromCache(v.OwnerUserID, v.ConversationID) - } else { - err = rocksCache.DelUserConversationIDListFromCache(v.OwnerUserID) - } - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), v.ConversationID, v.OwnerUserID) - } - resp.Success = append(resp.Success, v.ConversationID) - // if is set private msg operation,then peer user need to sync and set tips\ - if v.ConversationType == constant.SingleChatType && req.NotificationType == constant.ConversationPrivateChatNotification { - if err := syncPeerUserConversation(v, req.OperationID); err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "syncPeerUserConversation", err.Error()) - } - } - } - chat.ConversationChangeNotification(req.OperationID, req.OwnerUserID) - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "rpc return", resp.String()) - resp.CommonResp = &pbUser.CommonResp{} - return resp, nil -} - -func (s *userServer) GetAllConversations(ctx context.Context, req *pbUser.GetAllConversationsReq) (*pbUser.GetAllConversationsResp, error) { - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String()) - resp := &pbUser.GetAllConversationsResp{Conversations: []*pbConversation.Conversation{}} - conversations, err := rocksCache.GetUserAllConversationList(req.OwnerUserID) - log.NewDebug(req.OperationID, "conversations: ", conversations) - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetConversations error", err.Error()) - resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg} - return resp, nil - } - if err = utils.CopyStructFields(&resp.Conversations, conversations); err != nil { - log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields error", err.Error()) - } - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "rpc return", resp.String()) - resp.CommonResp = &pbUser.CommonResp{} - return resp, nil -} - -func (s *userServer) GetConversation(ctx context.Context, req *pbUser.GetConversationReq) (*pbUser.GetConversationResp, error) { - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String()) - resp := &pbUser.GetConversationResp{Conversation: &pbConversation.Conversation{}} - conversation, err := rocksCache.GetConversationFromCache(req.OwnerUserID, req.ConversationID) - log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "conversation", conversation) - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetConversation error", err.Error()) - resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg} - return resp, nil - } - if err := utils.CopyStructFields(resp.Conversation, &conversation); err != nil { - log.Debug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields error", conversation, err.Error()) - } - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String()) - resp.CommonResp = &pbUser.CommonResp{} - return resp, nil -} - -func (s *userServer) GetConversations(ctx context.Context, req *pbUser.GetConversationsReq) (*pbUser.GetConversationsResp, error) { - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String()) - resp := &pbUser.GetConversationsResp{Conversations: []*pbConversation.Conversation{}} - conversations, err := rocksCache.GetConversationsFromCache(req.OwnerUserID, req.ConversationIDs) - log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "conversations", conversations) - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetConversations error", err.Error()) - resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg} - return resp, nil - } - if err := utils.CopyStructFields(&resp.Conversations, conversations); err != nil { - log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", conversations, err.Error()) - } - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String()) - resp.CommonResp = &pbUser.CommonResp{} - return resp, nil -} - -func (s *userServer) SetConversation(ctx context.Context, req *pbUser.SetConversationReq) (*pbUser.SetConversationResp, error) { - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String()) - resp := &pbUser.SetConversationResp{} - if req.NotificationType == 0 { - req.NotificationType = constant.ConversationOptChangeNotification - } - if req.Conversation.ConversationType == constant.GroupChatType { - groupInfo, err := imdb.GetGroupInfoByGroupID(req.Conversation.GroupID) - if err != nil { - log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", req.Conversation.GroupID, err.Error()) - resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg} - return resp, nil - } - if groupInfo.Status == constant.GroupStatusDismissed && !req.Conversation.IsNotInGroup { - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "group status is dismissed", groupInfo) - errMsg := "group status is dismissed" - resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg} - return resp, nil - } - } - var conversation imdb.Conversation - if err := utils.CopyStructFields(&conversation, req.Conversation); err != nil { - log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", *req.Conversation, err.Error()) - } - if err := db.DB.SetSingleConversationRecvMsgOpt(req.Conversation.OwnerUserID, req.Conversation.ConversationID, req.Conversation.RecvMsgOpt); err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "cache failed, rpc return", err.Error()) - resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg} - return resp, nil - } - isUpdate, err := imdb.SetConversation(conversation) - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetConversation error", err.Error()) - resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg} - return resp, nil - } - if isUpdate { - err = rocksCache.DelConversationFromCache(req.Conversation.OwnerUserID, req.Conversation.ConversationID) - } else { - err = rocksCache.DelUserConversationIDListFromCache(req.Conversation.OwnerUserID) - } - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.Conversation.ConversationID, req.Conversation.OwnerUserID) - } - - // notification - if req.Conversation.ConversationType == constant.SingleChatType && req.NotificationType == constant.ConversationPrivateChatNotification { - //sync peer user conversation if conversation is singleChatType - if err := syncPeerUserConversation(req.Conversation, req.OperationID); err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "syncPeerUserConversation", err.Error()) - resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg} - return resp, nil - } - } else { - chat.ConversationChangeNotification(req.OperationID, req.Conversation.OwnerUserID) - } - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "rpc return", resp.String()) - resp.CommonResp = &pbUser.CommonResp{} - return resp, nil -} - -func (s *userServer) SetRecvMsgOpt(ctx context.Context, req *pbUser.SetRecvMsgOptReq) (*pbUser.SetRecvMsgOptResp, error) { - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String()) - resp := &pbUser.SetRecvMsgOptResp{} - var conversation imdb.Conversation - if err := utils.CopyStructFields(&conversation, req); err != nil { - log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", *req, err.Error()) - } - if err := db.DB.SetSingleConversationRecvMsgOpt(req.OwnerUserID, req.ConversationID, req.RecvMsgOpt); err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "cache failed, rpc return", err.Error()) - resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg} - return resp, nil - } - stringList := strings.Split(req.ConversationID, "_") - if len(stringList) > 1 { - switch stringList[0] { - case "single": - conversation.UserID = stringList[1] - conversation.ConversationType = constant.SingleChatType - case "group": - conversation.GroupID = stringList[1] - conversation.ConversationType = constant.GroupChatType - } - } - isUpdate, err := imdb.SetRecvMsgOpt(conversation) - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetConversation error", err.Error()) - resp.CommonResp = &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg} - return resp, nil - } - if isUpdate { - err = rocksCache.DelConversationFromCache(conversation.OwnerUserID, conversation.ConversationID) - } else { - err = rocksCache.DelUserConversationIDListFromCache(conversation.OwnerUserID) - } - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), conversation.ConversationID, err.Error()) - } - chat.ConversationChangeNotification(req.OperationID, req.OwnerUserID) - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String()) - resp.CommonResp = &pbUser.CommonResp{} - return resp, nil -} - -func (s *userServer) GetAllUserID(_ context.Context, req *pbUser.GetAllUserIDReq) (*pbUser.GetAllUserIDResp, error) { - log.NewInfo(req.OperationID, "GetAllUserID args ", req.String()) - if !token_verify.IsManagerUserID(req.OpUserID) { - log.NewError(req.OperationID, "IsManagerUserID false ", req.OpUserID) - return &pbUser.GetAllUserIDResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil - } - uidList, err := imdb.SelectAllUserID() - if err != nil { - log.NewError(req.OperationID, "SelectAllUserID false ", err.Error()) - return &pbUser.GetAllUserIDResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil - } else { - log.NewInfo(req.OperationID, "GetAllUserID rpc return ", pbUser.GetAllUserIDResp{CommonResp: &pbUser.CommonResp{}, UserIDList: uidList}) - return &pbUser.GetAllUserIDResp{CommonResp: &pbUser.CommonResp{}, UserIDList: uidList}, nil - } -} - -func (s *userServer) SyncJoinedGroupMemberFaceURL(userID string, faceURL string, operationID string, opUserID string) { - joinedGroupIDList, err := rocksCache.GetJoinedGroupIDListFromCache(userID) - if err != nil { - log.NewWarn(operationID, "GetJoinedGroupIDListByUserID failed ", userID, err.Error()) return } - for _, groupID := range joinedGroupIDList { - groupMemberInfo := imdb.GroupMember{UserID: userID, GroupID: groupID, FaceURL: faceURL} - if err := imdb.UpdateGroupMemberInfo(groupMemberInfo); err != nil { - log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), groupMemberInfo) - continue - } - //if err := rocksCache.DelAllGroupMembersInfoFromCache(groupID); err != nil { - // log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), groupID) - // continue - //} - if err := rocksCache.DelGroupMemberInfoFromCache(groupID, userID); err != nil { - log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), groupID, userID) - continue - } - chat.GroupMemberInfoSetNotification(operationID, opUserID, groupID, userID) - } -} - -func (s *userServer) SyncJoinedGroupMemberNickname(userID string, newNickname, oldNickname string, operationID string, opUserID string) { - joinedGroupIDList, err := imdb.GetJoinedGroupIDListByUserID(userID) + client := pbGroup.NewGroupClient(etcdConn) + newReq := &pbGroup.GetJoinedGroupListReq{FromUserID: userID} + rpcResp, err := client.GetJoinedGroupList(ctx, newReq) if err != nil { - log.NewWarn(operationID, "GetJoinedGroupIDListByUserID failed ", userID, err.Error()) return } - for _, v := range joinedGroupIDList { - member, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(v, userID) + + for _, group := range rpcResp.Groups { + req := &pbGroup.SetGroupMemberInfoReq{GroupID: group.GroupID, UserID: userID, FaceURL: &wrappers.StringValue{Value: faceURL}} + _, err := client.SetGroupMemberInfo(ctx, req) if err != nil { - log.NewWarn(operationID, "GetGroupMemberInfoByGroupIDAndUserID failed ", err.Error(), v, userID) - continue - } - if member.Nickname == oldNickname { - groupMemberInfo := imdb.GroupMember{UserID: userID, GroupID: v, Nickname: newNickname} - if err := imdb.UpdateGroupMemberInfo(groupMemberInfo); err != nil { - log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), groupMemberInfo) - continue - } - //if err := rocksCache.DelAllGroupMembersInfoFromCache(v); err != nil { - // log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), v) - // continue - //} - if err := rocksCache.DelGroupMemberInfoFromCache(v, userID); err != nil { - log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), v) - } - chat.GroupMemberInfoSetNotification(operationID, opUserID, v, userID) + return } + chat.GroupMemberInfoSetNotification(operationID, opUserID, group.GroupID, userID) } } -func (s *userServer) AddUser(ctx context.Context, req *pbUser.AddUserReq) (*pbUser.AddUserResp, error) { - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String()) - resp := &pbUser.AddUserResp{CommonResp: &pbUser.CommonResp{}} - err := imdb.AddUser(req.UserInfo.UserID, req.UserInfo.PhoneNumber, req.UserInfo.Nickname, req.UserInfo.Email, req.UserInfo.Gender, req.UserInfo.FaceURL, req.UserInfo.BirthStr) +func (s *userServer) SyncJoinedGroupMemberNickname(ctx context.Context, userID string, newNickname, oldNickname string, operationID string, opUserID string) { + etcdConn, err := getcdv3.GetConn(ctx, config.Config.RpcRegisterName.OpenImFriendName) if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "AddUser", err.Error(), req.String()) - resp.CommonResp.ErrCode = constant.ErrDB.ErrCode - resp.CommonResp.ErrMsg = err.Error() - return resp, nil + return + } + client := pbGroup.NewGroupClient(etcdConn) + newReq := &pbGroup.GetJoinedGroupListReq{FromUserID: userID} + rpcResp, err := client.GetJoinedGroupList(ctx, newReq) + if err != nil { + return + } + req := pbGroup.GetUserInGroupMembersReq{UserID: userID} + for _, group := range rpcResp.Groups { + req.GroupIDs = append(req.GroupIDs, group.GroupID) + } + resp, err := client.GetUserInGroupMembers(ctx, &req) + if err != nil { + return + } + for _, v := range resp.Members { + if v.Nickname == oldNickname { + req := pbGroup.SetGroupMemberNicknameReq{Nickname: newNickname, GroupID: v.GroupID, UserID: v.UserID} + _, err := client.SetGroupMemberNickname(ctx, &req) + if err != nil { + return + } + chat.GroupMemberInfoSetNotification(operationID, opUserID, v.GroupID, userID) + } } - return resp, nil } func (s *userServer) GetUsersInfo(ctx context.Context, req *pbUser.GetUsersInfoReq) (*pbUser.GetUsersInfoResp, error) { @@ -447,7 +188,6 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI if err != nil { return nil, err } - oldNickname := "" if req.UserInfo.Nickname != "" { u, err := s.Take(ctx, req.UserInfo.UserID) @@ -456,7 +196,6 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI } oldNickname = u.Nickname } - user, err := utils2.NewPBUser(req.UserInfo).Convert() if err != nil { return nil, err @@ -469,36 +208,26 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI if err != nil { return nil, err } - client := pbFriend.NewFriendClient(etcdConn) - newReq := &pbFriend.GetFriendListReq{ - CommID: &pbFriend.CommID{OperationID: req.OperationID, FromUserID: req.UserInfo.UserID, OpUserID: req.OpUserID}, - } - + newReq := &pbFriend.GetFriendListReq{UserID: req.UserInfo.UserID} rpcResp, err := client.GetFriendList(context.Background(), newReq) if err != nil { - log.NewError(req.OperationID, "GetFriendList failed ", err.Error(), newReq) - return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{ErrCode: 500, ErrMsg: err.Error()}}, nil + return nil, err } - for _, v := range rpcResp.FriendInfoList { - log.Info(req.OperationID, "UserInfoUpdatedNotification ", req.UserInfo.UserID, v.FriendUser.UserID) - // chat.UserInfoUpdatedNotification(req.OperationID, req.UserInfo.UserID, v.FriendUser.UserID) - chat.FriendInfoUpdatedNotification(req.OperationID, req.UserInfo.UserID, v.FriendUser.UserID, req.OpUserID) - } - if err := rocksCache.DelUserInfoFromCache(user.UserID); err != nil { - log.NewError(req.OperationID, "GetFriendList failed ", err.Error(), newReq) - return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: err.Error()}}, nil - } - //chat.UserInfoUpdatedNotification(req.OperationID, req.OpUserID, req.UserInfo.UserID) - chat.UserInfoUpdatedNotification(req.OperationID, req.OpUserID, req.UserInfo.UserID) - log.Info(req.OperationID, "UserInfoUpdatedNotification ", req.UserInfo.UserID, req.OpUserID) + go func() { + for _, v := range rpcResp.FriendInfoList { + chat.FriendInfoUpdatedNotification(tools.OperationID(ctx), req.UserInfo.UserID, v.FriendUser.UserID, tools.OpUserID(ctx)) + } + }() + + chat.UserInfoUpdatedNotification(tools.OperationID(ctx), tools.OpUserID(ctx), req.UserInfo.UserID) if req.UserInfo.FaceURL != "" { - s.SyncJoinedGroupMemberFaceURL(req.UserInfo.UserID, req.UserInfo.FaceURL, req.OperationID, req.OpUserID) + s.SyncJoinedGroupMemberFaceURL(ctx, req.UserInfo.UserID, req.UserInfo.FaceURL, tools.OperationID(ctx), tools.OpUserID(ctx)) } if req.UserInfo.Nickname != "" { - s.SyncJoinedGroupMemberNickname(req.UserInfo.UserID, req.UserInfo.Nickname, oldNickname, req.OperationID, req.OpUserID) + s.SyncJoinedGroupMemberNickname(ctx, req.UserInfo.UserID, req.UserInfo.Nickname, oldNickname, tools.OperationID(ctx), tools.OpUserID(ctx)) } - return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{}}, nil + return &resp, nil } func (s *userServer) SetGlobalRecvMessageOpt(ctx context.Context, req *pbUser.SetGlobalRecvMessageOptReq) (*pbUser.SetGlobalRecvMessageOptResp, error) { @@ -559,74 +288,48 @@ func (s *userServer) GetUsers(ctx context.Context, req *pbUser.GetUsersReq) (*pb } if req.UserName != "" { - usersDB, err = imdb.GetUserByName(req.UserName, req.Pagination.ShowNumber, req.Pagination.PageNumber) + usersDB, total, err := s.GetByName(ctx, req.UserName, req.Pagination.ShowNumber, req.Pagination.PageNumber) if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), req.UserName, req.Pagination.ShowNumber, req.Pagination.PageNumber, err.Error()) - resp.CommonResp.ErrCode = constant.ErrDB.ErrCode - resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg - return resp, nil + return nil, err } - resp.TotalNums, err = imdb.GetUsersCount(req.UserName) - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), req.UserName, err.Error()) - resp.CommonResp.ErrCode = constant.ErrDB.ErrCode - resp.CommonResp.ErrMsg = err.Error() - return resp, nil + resp.Total = int32(total) + for _, v := range usersDB { + u1, err := utils2.NewDBUser(v).Convert() + if err != nil { + return nil, err + } + resp.Users = append(resp.Users, u1) } - + return &resp, nil } else if req.Content != "" { - var count int64 - usersDB, count, err = imdb.GetUsersByNameAndID(req.Content, req.Pagination.ShowNumber, req.Pagination.PageNumber) + usersDB, total, err := s.GetByNameAndID(ctx, req.UserName, req.Pagination.ShowNumber, req.Pagination.PageNumber) if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUsers failed", req.Pagination.ShowNumber, req.Pagination.PageNumber, err.Error()) - resp.CommonResp.ErrCode = constant.ErrDB.ErrCode - resp.CommonResp.ErrMsg = err.Error() - return resp, nil + return nil, err } - resp.TotalNums = int32(count) + resp.Total = int32(total) + for _, v := range usersDB { + u1, err := utils2.NewDBUser(v).Convert() + if err != nil { + return nil, err + } + resp.Users = append(resp.Users, u1) + } + return &resp, nil } - else { - usersDB, err = imdb.GetUsers(req.Pagination.ShowNumber, req.Pagination.PageNumber) - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUsers failed", req.Pagination.ShowNumber, req.Pagination.PageNumber, err.Error()) - resp.CommonResp.ErrCode = constant.ErrDB.ErrCode - resp.CommonResp.ErrMsg = err.Error() - return resp, nil - } - resp.TotalNums, err = imdb.GetTotalUserNum() - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error()) - resp.CommonResp.ErrCode = constant.ErrDB.ErrCode - resp.CommonResp.ErrMsg = err.Error() - return resp, nil - } - } - for _, userDB := range usersDB { - var user sdkws.UserInfo - utils.CopyStructFields(&user, userDB) - user.CreateTime = uint32(userDB.CreateTime.Unix()) - user.BirthStr = utils.TimeToString(userDB.Birth) - resp.UserList = append(resp.UserList, &pbUser.CmsUser{User: &user}) - } - - var userIDList []string - for _, v := range resp.UserList { - userIDList = append(userIDList, v.User.UserID) - } - isBlockUser, err := imdb.UsersIsBlock(userIDList) + usersDB, total, err := s.Get(ctx, req.Pagination.ShowNumber, req.Pagination.PageNumber) if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), userIDList) - resp.CommonResp.ErrCode = constant.ErrDB.ErrCode - resp.CommonResp.ErrMsg = err.Error() - return resp, nil + return nil, err } - for _, v := range resp.UserList { - if utils.IsContain(v.User.UserID, isBlockUser) { - v.IsBlock = true + resp.Total = int32(total) + + for _, userDB := range usersDB { + u, err := utils2.NewDBUser(userDB).Convert() + if err != nil { + return nil, err } + resp.Users = append(resp.Users, u) } - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String()) - return resp, nil + return &resp, nil } diff --git a/internal/utils/convert.go b/internal/utils/convert.go index 61dc80586..1660219ae 100644 --- a/internal/utils/convert.go +++ b/internal/utils/convert.go @@ -281,7 +281,7 @@ func (pb *PBUser) Convert() (*relation.User, error) { func (db *DBUser) Convert() (*sdk.UserInfo, error) { dst := &sdk.UserInfo{} utils.CopyStructFields(dst, db) - dst.CreateTime = uint32(db.CreateTime.Unix()) + dst.CreateTime = db.CreateTime.Unix() dst.Birthday = db.Birth.Unix() return dst, nil } diff --git a/pkg/common/db/controller/group.go b/pkg/common/db/controller/group.go index 7164c851f..176cbafd1 100644 --- a/pkg/common/db/controller/group.go +++ b/pkg/common/db/controller/group.go @@ -18,17 +18,73 @@ type GroupInterface interface { DeleteGroupByIDs(ctx context.Context, groupIDs []string) error TakeGroupByID(ctx context.Context, groupID string) (group *relation.Group, err error) GetJoinedGroupList(ctx context.Context, userID string) ([]*relation.Group, error) + GetGroupMemberList(ctx context.Context, groupID string) ([]*relation.GroupMember, error) + GetGroupMemberListByUserID(ctx context.Context, groupID string, userIDs []string) ([]*relation.GroupMember, error) + GetGroupMemberFilterList(ctx context.Context, groupID string, filter int32, begin int32, maxNumber int32) ([]*relation.GroupMember, error) // relation.GetGroupMemberByGroupID(req.GroupID, req.Filter, req.NextSeq, 30) GetGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]int, error) GetGroupOwnerUserID(ctx context.Context, groupIDs []string) (map[string]string, error) + + CreateGroupMember(ctx context.Context, groupMember []*relation.GroupMember) error + + CreateGroupRequest(ctx context.Context, requests []*relation.GroupRequest) error + //mongo CreateSuperGroup(ctx context.Context, groupID string, initMemberIDList []string) error + AddUserToSuperGroup(ctx context.Context, groupID string, userIDs []string) error GetSuperGroupByID(ctx context.Context, groupID string) (superGroup *unrelation.SuperGroup, err error) } +var _ GroupInterface = (*GroupController)(nil) + type GroupController struct { database GroupDataBaseInterface } +func (g *GroupController) GetJoinedGroupList(ctx context.Context, userID string) ([]*relation.Group, error) { + //TODO implement me + panic("implement me") +} + +func (g *GroupController) GetGroupMemberList(ctx context.Context, groupID string) ([]*relation.GroupMember, error) { + //TODO implement me + panic("implement me") +} + +func (g *GroupController) GetGroupMemberListByUserID(ctx context.Context, groupID string, userIDs []string) ([]*relation.GroupMember, error) { + //TODO implement me + panic("implement me") +} + +func (g *GroupController) GetGroupMemberFilterList(ctx context.Context, groupID string, filter int32, begin int32, maxNumber int32) ([]*relation.GroupMember, error) { + //TODO implement me + panic("implement me") +} + +func (g *GroupController) GetGroupMemberNum(ctx context.Context, groupIDs []string) (map[string]int, error) { + //TODO implement me + panic("implement me") +} + +func (g *GroupController) GetGroupOwnerUserID(ctx context.Context, groupIDs []string) (map[string]string, error) { + //TODO implement me + panic("implement me") +} + +func (g *GroupController) CreateGroupMember(ctx context.Context, groupMember []*relation.GroupMember) error { + //TODO implement me + panic("implement me") +} + +func (g *GroupController) CreateGroupRequest(ctx context.Context, requests []*relation.GroupRequest) error { + //TODO implement me + panic("implement me") +} + +func (g *GroupController) AddUserToSuperGroup(ctx context.Context, groupID string, userIDs []string) error { + //TODO implement me + panic("implement me") +} + func NewGroupController(db *gorm.DB, rdb redis.UniversalClient, mgoDB *mongo.Client) GroupInterface { groupController := &GroupController{database: newGroupDatabase(db, rdb, mgoDB)} return groupController diff --git a/pkg/common/db/controller/user.go b/pkg/common/db/controller/user.go index 169c051bf..1fcba9060 100644 --- a/pkg/common/db/controller/user.go +++ b/pkg/common/db/controller/user.go @@ -12,7 +12,9 @@ type UserInterface interface { Take(ctx context.Context, userID string) (user *relation.User, err error) Update(ctx context.Context, users []*relation.User) (err error) UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error) - GetByName(ctx context.Context, userName string, showNumber, pageNumber int32) (users []*relation.User, err error) + GetByName(ctx context.Context, userName string, showNumber, pageNumber int32) (users []*relation.User, count int64, err error) + GetByNameAndID(ctx context.Context, content string, showNumber, pageNumber int32) (users []*relation.User, count int64, err error) + Get(ctx context.Context, showNumber, pageNumber int32) (users []*relation.User, count int64, err error) } type UserController struct { @@ -34,10 +36,15 @@ func (u *UserController) Update(ctx context.Context, users []*relation.User) (er func (u *UserController) UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error) { return u.database.UpdateByMap(ctx, userID, args) } -func (u *UserController) GetByName(ctx context.Context, userName string, showNumber, pageNumber int32) (users []*relation.User, err error) { +func (u *UserController) GetByName(ctx context.Context, userName string, showNumber, pageNumber int32) (users []*relation.User, count int64, err error) { return u.database.GetByName(ctx, userName, showNumber, pageNumber) } - +func (u *UserController) GetByNameAndID(ctx context.Context, content string, showNumber, pageNumber int32) (users []*relation.User, count int64, err error) { + return u.database.GetByNameAndID(ctx, content, showNumber, pageNumber) +} +func (u *UserController) Get(ctx context.Context, showNumber, pageNumber int32) (users []*relation.User, count int64, err error) { + return u.database.Get(ctx, showNumber, pageNumber) +} func NewUserController(db *gorm.DB) UserInterface { controller := &UserController{database: newUserDatabase(db)} return controller @@ -49,7 +56,9 @@ type UserDatabaseInterface interface { Take(ctx context.Context, userID string) (user *relation.User, err error) Update(ctx context.Context, users []*relation.User) (err error) UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error) - GetByName(ctx context.Context, userName string, showNumber, pageNumber int32) (users []*relation.User, err error) + GetByName(ctx context.Context, userName string, showNumber, pageNumber int32) (users []*relation.User, count int64, err error) + GetByNameAndID(ctx context.Context, content string, showNumber, pageNumber int32) (users []*relation.User, count int64, err error) + Get(ctx context.Context, showNumber, pageNumber int32) (users []*User, count int64, err error) } type UserDatabase struct { @@ -80,6 +89,12 @@ func (u *UserDatabase) Update(ctx context.Context, users []*relation.User) (err func (u *UserDatabase) UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error) { return u.sqlDB.UpdateByMap(ctx, userID, args) } -func (u *UserDatabase) GetByName(ctx context.Context, userName string, showNumber, pageNumber int32) (users []*relation.User, err error) { +func (u *UserDatabase) GetByName(ctx context.Context, userName string, showNumber, pageNumber int32) (users []*relation.User, count int64, err error) { return u.sqlDB.GetByName(ctx, userName, showNumber, pageNumber) } +func (u *UserDatabase) GetByNameAndID(ctx context.Context, content string, showNumber, pageNumber int32) (users []*relation.User, count int64, err error) { + return u.sqlDB.GetByNameAndID(ctx, content, showNumber, pageNumber) +} +func (u *UserDatabase) Get(ctx context.Context, showNumber, pageNumber int32) (users []*relation.User, count int64, err error) { + return u.sqlDB.Get(ctx, showNumber, pageNumber) +} diff --git a/pkg/common/db/relation/user_model_k.go b/pkg/common/db/relation/user_model_k.go index 4157ae993..8bd0b1a34 100644 --- a/pkg/common/db/relation/user_model_k.go +++ b/pkg/common/db/relation/user_model_k.go @@ -71,10 +71,37 @@ func (u *User) Take(ctx context.Context, userID string) (user *User, err error) return user, err } -func (u *User) GetByName(ctx context.Context, userName string, showNumber, pageNumber int32) (users []*User, err error) { +func (u *User) GetByName(ctx context.Context, userName string, showNumber, pageNumber int32) (users []*User, count int64, err error) { + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userName", userName, "showNumber", showNumber, "pageNumber", pageNumber, "users", users, "count", count) + }() + err = u.DB.Where(" name like ?", fmt.Sprintf("%%%s%%", userName)).Limit(int(showNumber)).Offset(int(showNumber * pageNumber)).Find(&users).Error + if err != nil { + return nil, 0, utils.Wrap(err, "") + } + return users, count, utils.Wrap(u.DB.Where(" name like ? ", fmt.Sprintf("%%%s%%", userName)).Count(&count).Error, "") +} + +func (u *User) GetByNameAndID(ctx context.Context, content string, showNumber, pageNumber int32) (users []*User, count int64, err error) { defer func() { tracelog.SetCtxDebug(ctx, utils.GetFuncName(1), err, "userName", userName, "showNumber", showNumber, "pageNumber", pageNumber, "users", users) }() - err = u.DB.Where(" name like ?", fmt.Sprintf("%%%s%%", userName)).Limit(int(showNumber)).Offset(int(showNumber * (pageNumber - 1))).Find(&users).Error - return users, utils.Wrap(err, "") + db := u.DB.Where(" name like ? or user_id = ? ", fmt.Sprintf("%%%s%%", content), content) + if err := db.Count(&count).Error; err != nil { + return nil, 0, utils.Wrap(err, "") + } + err = utils.Wrap(db.Limit(int(showNumber)).Offset(int(showNumber*pageNumber)).Find(&users).Error, "") + return +} + +func (u *User) Get(ctx context.Context, showNumber, pageNumber int32) (users []*User, count int64, err error) { + defer func() { + trace_log.SetCtxDebug(ctx, utils.GetFuncName(1), err, "showNumber", showNumber, "pageNumber", pageNumber, "users", users, "count", count) + }() + err = u.DB.Model(u).Count(&count).Error + if err != nil { + return nil, 0, utils.Wrap(err, "") + } + err = utils.Wrap(u.DB.Limit(int(showNumber)).Offset(int(pageNumber*showNumber)).Find(&users).Error, "") + return } diff --git a/pkg/common/token_verify/jwt_token.go b/pkg/common/token_verify/jwt_token.go index f12f38851..6858cb113 100644 --- a/pkg/common/token_verify/jwt_token.go +++ b/pkg/common/token_verify/jwt_token.go @@ -173,6 +173,10 @@ func CheckAccessV3(ctx context.Context, ownerUserID string) (err error) { return constant.ErrIdentity.Wrap(utils.GetSelfFuncName()) } +func IsAppManagerUid(ctx context.Context) bool { + return utils.IsContain(tools.OpUserID(ctx), config.Config.Manager.AppManagerUid) +} + func CheckAdmin(ctx context.Context) error { if utils.IsContain(tools.OpUserID(ctx), config.Config.Manager.AppManagerUid) { return nil diff --git a/pkg/common/utils/utils.go b/pkg/common/utils/utils.go deleted file mode 100644 index fd8d43fac..000000000 --- a/pkg/common/utils/utils.go +++ /dev/null @@ -1,160 +0,0 @@ -package utils - -import ( - imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/token_verify" - open_im_sdk "Open_IM/pkg/proto/sdk_ws" - "Open_IM/pkg/utils" - "math/rand" - "strconv" - "time" -) - -func OperationIDGenerator() string { - return strconv.FormatInt(time.Now().UnixNano()+int64(rand.Uint32()), 10) -} - -func FriendOpenIMCopyDB(dst *imdb.Friend, src *open_im_sdk.FriendInfo) { - utils.CopyStructFields(dst, src) - dst.FriendUserID = src.FriendUser.UserID - dst.CreateTime = utils.UnixSecondToTime(int64(src.CreateTime)) -} - -func FriendDBCopyOpenIM(dst *open_im_sdk.FriendInfo, src *imdb.Friend) error { - utils.CopyStructFields(dst, src) - user, err := imdb.GetUserByUserID(src.FriendUserID) - if err != nil { - return utils.Wrap(err, "") - } - utils.CopyStructFields(dst.FriendUser, user) - dst.CreateTime = uint32(src.CreateTime.Unix()) - if dst.FriendUser == nil { - dst.FriendUser = &open_im_sdk.UserInfo{} - } - dst.FriendUser.CreateTime = uint32(user.CreateTime.Unix()) - return nil -} - -func FriendRequestOpenIMCopyDB(dst *imdb.FriendRequest, src *open_im_sdk.FriendRequest) { - utils.CopyStructFields(dst, src) - dst.CreateTime = utils.UnixSecondToTime(int64(src.CreateTime)) - dst.HandleTime = utils.UnixSecondToTime(int64(src.HandleTime)) -} - -func FriendRequestDBCopyOpenIM(dst *open_im_sdk.FriendRequest, src *imdb.FriendRequest) error { - utils.CopyStructFields(dst, src) - user, err := imdb.GetUserByUserID(src.FromUserID) - if err != nil { - return utils.Wrap(err, "") - } - dst.FromNickname = user.Nickname - dst.FromFaceURL = user.FaceURL - dst.FromGender = user.Gender - user, err = imdb.GetUserByUserID(src.ToUserID) - if err != nil { - return utils.Wrap(err, "") - } - dst.ToNickname = user.Nickname - dst.ToFaceURL = user.FaceURL - dst.ToGender = user.Gender - dst.CreateTime = uint32(src.CreateTime.Unix()) - dst.HandleTime = uint32(src.HandleTime.Unix()) - return nil -} - -func BlackOpenIMCopyDB(dst *imdb.Black, src *open_im_sdk.BlackInfo) { - utils.CopyStructFields(dst, src) - dst.BlockUserID = src.BlackUserInfo.UserID - dst.CreateTime = utils.UnixSecondToTime(int64(src.CreateTime)) -} - -func BlackDBCopyOpenIM(dst *open_im_sdk.BlackInfo, src *imdb.Black) error { - utils.CopyStructFields(dst, src) - dst.CreateTime = uint32(src.CreateTime.Unix()) - user, err := imdb.GetUserByUserID(src.BlockUserID) - if err != nil { - return utils.Wrap(err, "") - } - utils.CopyStructFields(dst.BlackUserInfo, user) - return nil -} - -func GroupOpenIMCopyDB(dst *imdb.Group, src *open_im_sdk.GroupInfo) { - utils.CopyStructFields(dst, src) -} - -func GroupDBCopyOpenIM(dst *open_im_sdk.GroupInfo, src *imdb.Group) error { - utils.CopyStructFields(dst, src) - user, err := imdb.GetGroupOwnerInfoByGroupID(src.GroupID) - if err != nil { - return utils.Wrap(err, "") - } - dst.OwnerUserID = user.UserID - - memberCount, err := imdb.GetGroupMemberNumByGroupID(src.GroupID) - dst.MemberCount = uint32(memberCount) - if err != nil { - return utils.Wrap(err, "") - } - dst.CreateTime = uint32(src.CreateTime.Unix()) - dst.NotificationUpdateTime = uint32(src.NotificationUpdateTime.Unix()) - if src.NotificationUpdateTime.Unix() < 0 { - dst.NotificationUpdateTime = 0 - } - return nil -} - -func GroupMemberOpenIMCopyDB(dst *imdb.GroupMember, src *open_im_sdk.GroupMemberFullInfo) { - utils.CopyStructFields(dst, src) -} - -func GroupMemberDBCopyOpenIM(dst *open_im_sdk.GroupMemberFullInfo, src *imdb.GroupMember) error { - utils.CopyStructFields(dst, src) - if token_verify.IsManagerUserID(src.UserID) { - u, err := imdb.GetUserByUserID(src.UserID) - if err != nil { - return utils.Wrap(err, "") - } - - utils.CopyStructFields(dst, u) - - dst.AppMangerLevel = 1 - } - dst.JoinTime = int32(src.JoinTime.Unix()) - if src.JoinTime.Unix() < 0 { - dst.JoinTime = 0 - return nil - } - dst.MuteEndTime = uint32(src.MuteEndTime.Unix()) - if dst.MuteEndTime < uint32(time.Now().Unix()) { - dst.MuteEndTime = 0 - } - return nil -} - -func GroupRequestOpenIMCopyDB(dst *imdb.GroupRequest, src *open_im_sdk.GroupRequest) { - utils.CopyStructFields(dst, src) -} - -func GroupRequestDBCopyOpenIM(dst *open_im_sdk.GroupRequest, src *imdb.GroupRequest) { - utils.CopyStructFields(dst, src) - dst.ReqTime = uint32(src.ReqTime.Unix()) - dst.HandleTime = uint32(src.HandledTime.Unix()) -} - -func UserOpenIMCopyDB(dst *imdb.User, src *open_im_sdk.UserInfo) { - utils.CopyStructFields(dst, src) - dst.Birth, _ = utils.TimeStringToTime(src.BirthStr) - dst.CreateTime = utils.UnixSecondToTime(int64(src.CreateTime)) -} - -func UserDBCopyOpenIM(dst *open_im_sdk.UserInfo, src *imdb.User) { - utils.CopyStructFields(dst, src) - dst.CreateTime = uint32(src.CreateTime.Unix()) - //dst.Birth = uint32(src.Birth.Unix()) - dst.BirthStr = utils.TimeToString(src.Birth) -} - -func UserDBCopyOpenIMPublicUser(dst *open_im_sdk.PublicUserInfo, src *imdb.User) { - utils.CopyStructFields(dst, src) -} diff --git a/pkg/proto/friend/friend.pb.go b/pkg/proto/friend/friend.pb.go index 46a39bc7b..32f70037c 100644 --- a/pkg/proto/friend/friend.pb.go +++ b/pkg/proto/friend/friend.pb.go @@ -25,8 +25,8 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type GetFriendsInfoReq struct { - ToUserID string `protobuf:"bytes,1,opt,name=ToUserID" json:"ToUserID,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"` + FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` + ToUserIDs []string `protobuf:"bytes,2,rep,name=toUserIDs" json:"toUserIDs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -36,7 +36,7 @@ func (m *GetFriendsInfoReq) Reset() { *m = GetFriendsInfoReq{} } func (m *GetFriendsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetFriendsInfoReq) ProtoMessage() {} func (*GetFriendsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{0} + return fileDescriptor_friend_971ef02230ce9e85, []int{0} } func (m *GetFriendsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendsInfoReq.Unmarshal(m, b) @@ -56,13 +56,6 @@ func (m *GetFriendsInfoReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetFriendsInfoReq proto.InternalMessageInfo -func (m *GetFriendsInfoReq) GetToUserID() string { - if m != nil { - return m.ToUserID - } - return "" -} - func (m *GetFriendsInfoReq) GetFromUserID() string { if m != nil { return m.FromUserID @@ -70,38 +63,45 @@ func (m *GetFriendsInfoReq) GetFromUserID() string { return "" } -type GetFriendInfoResp struct { +func (m *GetFriendsInfoReq) GetToUserIDs() []string { + if m != nil { + return m.ToUserIDs + } + return nil +} + +type GetFriendsInfoResp struct { FriendInfoList []*sdk_ws.FriendInfo `protobuf:"bytes,1,rep,name=FriendInfoList" json:"FriendInfoList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *GetFriendInfoResp) Reset() { *m = GetFriendInfoResp{} } -func (m *GetFriendInfoResp) String() string { return proto.CompactTextString(m) } -func (*GetFriendInfoResp) ProtoMessage() {} -func (*GetFriendInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{1} +func (m *GetFriendsInfoResp) Reset() { *m = GetFriendsInfoResp{} } +func (m *GetFriendsInfoResp) String() string { return proto.CompactTextString(m) } +func (*GetFriendsInfoResp) ProtoMessage() {} +func (*GetFriendsInfoResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_971ef02230ce9e85, []int{1} } -func (m *GetFriendInfoResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetFriendInfoResp.Unmarshal(m, b) +func (m *GetFriendsInfoResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetFriendsInfoResp.Unmarshal(m, b) } -func (m *GetFriendInfoResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetFriendInfoResp.Marshal(b, m, deterministic) +func (m *GetFriendsInfoResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetFriendsInfoResp.Marshal(b, m, deterministic) } -func (dst *GetFriendInfoResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetFriendInfoResp.Merge(dst, src) +func (dst *GetFriendsInfoResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetFriendsInfoResp.Merge(dst, src) } -func (m *GetFriendInfoResp) XXX_Size() int { - return xxx_messageInfo_GetFriendInfoResp.Size(m) +func (m *GetFriendsInfoResp) XXX_Size() int { + return xxx_messageInfo_GetFriendsInfoResp.Size(m) } -func (m *GetFriendInfoResp) XXX_DiscardUnknown() { - xxx_messageInfo_GetFriendInfoResp.DiscardUnknown(m) +func (m *GetFriendsInfoResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetFriendsInfoResp.DiscardUnknown(m) } -var xxx_messageInfo_GetFriendInfoResp proto.InternalMessageInfo +var xxx_messageInfo_GetFriendsInfoResp proto.InternalMessageInfo -func (m *GetFriendInfoResp) GetFriendInfoList() []*sdk_ws.FriendInfo { +func (m *GetFriendsInfoResp) GetFriendInfoList() []*sdk_ws.FriendInfo { if m != nil { return m.FriendInfoList } @@ -109,9 +109,9 @@ func (m *GetFriendInfoResp) GetFriendInfoList() []*sdk_ws.FriendInfo { } type AddFriendReq struct { - ToUserID string `protobuf:"bytes,1,opt,name=ToUserID" json:"ToUserID,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"` - ReqMsg string `protobuf:"bytes,3,opt,name=ReqMsg" json:"ReqMsg,omitempty"` + FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` + ToUserID string `protobuf:"bytes,2,opt,name=toUserID" json:"toUserID,omitempty"` + ReqMsg string `protobuf:"bytes,3,opt,name=reqMsg" json:"reqMsg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -121,7 +121,7 @@ func (m *AddFriendReq) Reset() { *m = AddFriendReq{} } func (m *AddFriendReq) String() string { return proto.CompactTextString(m) } func (*AddFriendReq) ProtoMessage() {} func (*AddFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{2} + return fileDescriptor_friend_971ef02230ce9e85, []int{2} } func (m *AddFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendReq.Unmarshal(m, b) @@ -141,16 +141,16 @@ func (m *AddFriendReq) XXX_DiscardUnknown() { var xxx_messageInfo_AddFriendReq proto.InternalMessageInfo -func (m *AddFriendReq) GetToUserID() string { +func (m *AddFriendReq) GetFromUserID() string { if m != nil { - return m.ToUserID + return m.FromUserID } return "" } -func (m *AddFriendReq) GetFromUserID() string { +func (m *AddFriendReq) GetToUserID() string { if m != nil { - return m.FromUserID + return m.ToUserID } return "" } @@ -163,17 +163,16 @@ func (m *AddFriendReq) GetReqMsg() string { } type AddFriendResp struct { - CommonResp *sdk_ws.CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *AddFriendResp) Reset() { *m = AddFriendResp{} } func (m *AddFriendResp) String() string { return proto.CompactTextString(m) } func (*AddFriendResp) ProtoMessage() {} func (*AddFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{3} + return fileDescriptor_friend_971ef02230ce9e85, []int{3} } func (m *AddFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResp.Unmarshal(m, b) @@ -193,13 +192,6 @@ func (m *AddFriendResp) XXX_DiscardUnknown() { var xxx_messageInfo_AddFriendResp proto.InternalMessageInfo -func (m *AddFriendResp) GetCommonResp() *sdk_ws.CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - type ImportFriendReq struct { FriendUserIDList []string `protobuf:"bytes,1,rep,name=FriendUserIDList" json:"FriendUserIDList,omitempty"` FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"` @@ -212,7 +204,7 @@ func (m *ImportFriendReq) Reset() { *m = ImportFriendReq{} } func (m *ImportFriendReq) String() string { return proto.CompactTextString(m) } func (*ImportFriendReq) ProtoMessage() {} func (*ImportFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{4} + return fileDescriptor_friend_971ef02230ce9e85, []int{4} } func (m *ImportFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendReq.Unmarshal(m, b) @@ -256,7 +248,7 @@ func (m *ImportFriendResp) Reset() { *m = ImportFriendResp{} } func (m *ImportFriendResp) String() string { return proto.CompactTextString(m) } func (*ImportFriendResp) ProtoMessage() {} func (*ImportFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{5} + return fileDescriptor_friend_971ef02230ce9e85, []int{5} } func (m *ImportFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendResp.Unmarshal(m, b) @@ -276,103 +268,111 @@ func (m *ImportFriendResp) XXX_DiscardUnknown() { var xxx_messageInfo_ImportFriendResp proto.InternalMessageInfo -type GetFriendApplyListReq struct { - ToUserID string `protobuf:"bytes,1,opt,name=ToUserID" json:"ToUserID,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type GetToFriendApplyListReq struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + Pagination *sdk_ws.RequestPagination `protobuf:"bytes,2,opt,name=pagination" json:"pagination,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetFriendApplyListReq) Reset() { *m = GetFriendApplyListReq{} } -func (m *GetFriendApplyListReq) String() string { return proto.CompactTextString(m) } -func (*GetFriendApplyListReq) ProtoMessage() {} -func (*GetFriendApplyListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{6} +func (m *GetToFriendApplyListReq) Reset() { *m = GetToFriendApplyListReq{} } +func (m *GetToFriendApplyListReq) String() string { return proto.CompactTextString(m) } +func (*GetToFriendApplyListReq) ProtoMessage() {} +func (*GetToFriendApplyListReq) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_971ef02230ce9e85, []int{6} } -func (m *GetFriendApplyListReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetFriendApplyListReq.Unmarshal(m, b) +func (m *GetToFriendApplyListReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetToFriendApplyListReq.Unmarshal(m, b) } -func (m *GetFriendApplyListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetFriendApplyListReq.Marshal(b, m, deterministic) +func (m *GetToFriendApplyListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetToFriendApplyListReq.Marshal(b, m, deterministic) } -func (dst *GetFriendApplyListReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetFriendApplyListReq.Merge(dst, src) +func (dst *GetToFriendApplyListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetToFriendApplyListReq.Merge(dst, src) } -func (m *GetFriendApplyListReq) XXX_Size() int { - return xxx_messageInfo_GetFriendApplyListReq.Size(m) +func (m *GetToFriendApplyListReq) XXX_Size() int { + return xxx_messageInfo_GetToFriendApplyListReq.Size(m) } -func (m *GetFriendApplyListReq) XXX_DiscardUnknown() { - xxx_messageInfo_GetFriendApplyListReq.DiscardUnknown(m) +func (m *GetToFriendApplyListReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetToFriendApplyListReq.DiscardUnknown(m) } -var xxx_messageInfo_GetFriendApplyListReq proto.InternalMessageInfo +var xxx_messageInfo_GetToFriendApplyListReq proto.InternalMessageInfo -func (m *GetFriendApplyListReq) GetToUserID() string { +func (m *GetToFriendApplyListReq) GetUserID() string { if m != nil { - return m.ToUserID + return m.UserID } return "" } -func (m *GetFriendApplyListReq) GetFromUserID() string { +func (m *GetToFriendApplyListReq) GetPagination() *sdk_ws.RequestPagination { if m != nil { - return m.FromUserID + return m.Pagination } - return "" + return nil } -type GetFriendApplyListResp struct { +type GetToFriendApplyListResp struct { FriendRequestList []*sdk_ws.FriendRequest `protobuf:"bytes,1,rep,name=FriendRequestList" json:"FriendRequestList,omitempty"` + Total int32 `protobuf:"varint,2,opt,name=total" json:"total,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *GetFriendApplyListResp) Reset() { *m = GetFriendApplyListResp{} } -func (m *GetFriendApplyListResp) String() string { return proto.CompactTextString(m) } -func (*GetFriendApplyListResp) ProtoMessage() {} -func (*GetFriendApplyListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{7} +func (m *GetToFriendApplyListResp) Reset() { *m = GetToFriendApplyListResp{} } +func (m *GetToFriendApplyListResp) String() string { return proto.CompactTextString(m) } +func (*GetToFriendApplyListResp) ProtoMessage() {} +func (*GetToFriendApplyListResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_971ef02230ce9e85, []int{7} } -func (m *GetFriendApplyListResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetFriendApplyListResp.Unmarshal(m, b) +func (m *GetToFriendApplyListResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetToFriendApplyListResp.Unmarshal(m, b) } -func (m *GetFriendApplyListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetFriendApplyListResp.Marshal(b, m, deterministic) +func (m *GetToFriendApplyListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetToFriendApplyListResp.Marshal(b, m, deterministic) } -func (dst *GetFriendApplyListResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetFriendApplyListResp.Merge(dst, src) +func (dst *GetToFriendApplyListResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetToFriendApplyListResp.Merge(dst, src) } -func (m *GetFriendApplyListResp) XXX_Size() int { - return xxx_messageInfo_GetFriendApplyListResp.Size(m) +func (m *GetToFriendApplyListResp) XXX_Size() int { + return xxx_messageInfo_GetToFriendApplyListResp.Size(m) } -func (m *GetFriendApplyListResp) XXX_DiscardUnknown() { - xxx_messageInfo_GetFriendApplyListResp.DiscardUnknown(m) +func (m *GetToFriendApplyListResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetToFriendApplyListResp.DiscardUnknown(m) } -var xxx_messageInfo_GetFriendApplyListResp proto.InternalMessageInfo +var xxx_messageInfo_GetToFriendApplyListResp proto.InternalMessageInfo -func (m *GetFriendApplyListResp) GetFriendRequestList() []*sdk_ws.FriendRequest { +func (m *GetToFriendApplyListResp) GetFriendRequestList() []*sdk_ws.FriendRequest { if m != nil { return m.FriendRequestList } return nil } +func (m *GetToFriendApplyListResp) GetTotal() int32 { + if m != nil { + return m.Total + } + return 0 +} + type GetFriendListReq struct { - ToUserID string `protobuf:"bytes,1,opt,name=ToUserID" json:"ToUserID,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Pagination *sdk_ws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetFriendListReq) Reset() { *m = GetFriendListReq{} } func (m *GetFriendListReq) String() string { return proto.CompactTextString(m) } func (*GetFriendListReq) ProtoMessage() {} func (*GetFriendListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{8} + return fileDescriptor_friend_971ef02230ce9e85, []int{8} } func (m *GetFriendListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListReq.Unmarshal(m, b) @@ -392,22 +392,23 @@ func (m *GetFriendListReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetFriendListReq proto.InternalMessageInfo -func (m *GetFriendListReq) GetToUserID() string { +func (m *GetFriendListReq) GetPagination() *sdk_ws.RequestPagination { if m != nil { - return m.ToUserID + return m.Pagination } - return "" + return nil } -func (m *GetFriendListReq) GetFromUserID() string { +func (m *GetFriendListReq) GetUserID() string { if m != nil { - return m.FromUserID + return m.UserID } return "" } type GetFriendListResp struct { FriendInfoList []*sdk_ws.FriendInfo `protobuf:"bytes,1,rep,name=FriendInfoList" json:"FriendInfoList,omitempty"` + Total int32 `protobuf:"varint,2,opt,name=total" json:"total,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -417,7 +418,7 @@ func (m *GetFriendListResp) Reset() { *m = GetFriendListResp{} } func (m *GetFriendListResp) String() string { return proto.CompactTextString(m) } func (*GetFriendListResp) ProtoMessage() {} func (*GetFriendListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{9} + return fileDescriptor_friend_971ef02230ce9e85, []int{9} } func (m *GetFriendListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListResp.Unmarshal(m, b) @@ -444,9 +445,16 @@ func (m *GetFriendListResp) GetFriendInfoList() []*sdk_ws.FriendInfo { return nil } +func (m *GetFriendListResp) GetTotal() int32 { + if m != nil { + return m.Total + } + return 0 +} + type AddBlacklistReq struct { - ToUserID string `protobuf:"bytes,1,opt,name=ToUserID" json:"ToUserID,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"` + FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` + ToUserID string `protobuf:"bytes,2,opt,name=toUserID" json:"toUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -456,7 +464,7 @@ func (m *AddBlacklistReq) Reset() { *m = AddBlacklistReq{} } func (m *AddBlacklistReq) String() string { return proto.CompactTextString(m) } func (*AddBlacklistReq) ProtoMessage() {} func (*AddBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{10} + return fileDescriptor_friend_971ef02230ce9e85, []int{10} } func (m *AddBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddBlacklistReq.Unmarshal(m, b) @@ -476,16 +484,16 @@ func (m *AddBlacklistReq) XXX_DiscardUnknown() { var xxx_messageInfo_AddBlacklistReq proto.InternalMessageInfo -func (m *AddBlacklistReq) GetToUserID() string { +func (m *AddBlacklistReq) GetFromUserID() string { if m != nil { - return m.ToUserID + return m.FromUserID } return "" } -func (m *AddBlacklistReq) GetFromUserID() string { +func (m *AddBlacklistReq) GetToUserID() string { if m != nil { - return m.FromUserID + return m.ToUserID } return "" } @@ -500,7 +508,7 @@ func (m *AddBlacklistResp) Reset() { *m = AddBlacklistResp{} } func (m *AddBlacklistResp) String() string { return proto.CompactTextString(m) } func (*AddBlacklistResp) ProtoMessage() {} func (*AddBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{11} + return fileDescriptor_friend_971ef02230ce9e85, []int{11} } func (m *AddBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddBlacklistResp.Unmarshal(m, b) @@ -521,8 +529,8 @@ func (m *AddBlacklistResp) XXX_DiscardUnknown() { var xxx_messageInfo_AddBlacklistResp proto.InternalMessageInfo type RemoveBlacklistReq struct { - ToUserID string `protobuf:"bytes,1,opt,name=ToUserID" json:"ToUserID,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"` + FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` + ToUserID string `protobuf:"bytes,2,opt,name=toUserID" json:"toUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -532,7 +540,7 @@ func (m *RemoveBlacklistReq) Reset() { *m = RemoveBlacklistReq{} } func (m *RemoveBlacklistReq) String() string { return proto.CompactTextString(m) } func (*RemoveBlacklistReq) ProtoMessage() {} func (*RemoveBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{12} + return fileDescriptor_friend_971ef02230ce9e85, []int{12} } func (m *RemoveBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveBlacklistReq.Unmarshal(m, b) @@ -552,16 +560,16 @@ func (m *RemoveBlacklistReq) XXX_DiscardUnknown() { var xxx_messageInfo_RemoveBlacklistReq proto.InternalMessageInfo -func (m *RemoveBlacklistReq) GetToUserID() string { +func (m *RemoveBlacklistReq) GetFromUserID() string { if m != nil { - return m.ToUserID + return m.FromUserID } return "" } -func (m *RemoveBlacklistReq) GetFromUserID() string { +func (m *RemoveBlacklistReq) GetToUserID() string { if m != nil { - return m.FromUserID + return m.ToUserID } return "" } @@ -576,7 +584,7 @@ func (m *RemoveBlacklistResp) Reset() { *m = RemoveBlacklistResp{} } func (m *RemoveBlacklistResp) String() string { return proto.CompactTextString(m) } func (*RemoveBlacklistResp) ProtoMessage() {} func (*RemoveBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{13} + return fileDescriptor_friend_971ef02230ce9e85, []int{13} } func (m *RemoveBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveBlacklistResp.Unmarshal(m, b) @@ -597,17 +605,18 @@ func (m *RemoveBlacklistResp) XXX_DiscardUnknown() { var xxx_messageInfo_RemoveBlacklistResp proto.InternalMessageInfo type GetBlacklistReq struct { - FromUserID string `protobuf:"bytes,1,opt,name=FromUserID" json:"FromUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + Pagination *sdk_ws.RequestPagination `protobuf:"bytes,2,opt,name=pagination" json:"pagination,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetBlacklistReq) Reset() { *m = GetBlacklistReq{} } func (m *GetBlacklistReq) String() string { return proto.CompactTextString(m) } func (*GetBlacklistReq) ProtoMessage() {} func (*GetBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{14} + return fileDescriptor_friend_971ef02230ce9e85, []int{14} } func (m *GetBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistReq.Unmarshal(m, b) @@ -627,15 +636,23 @@ func (m *GetBlacklistReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetBlacklistReq proto.InternalMessageInfo -func (m *GetBlacklistReq) GetFromUserID() string { +func (m *GetBlacklistReq) GetUserID() string { if m != nil { - return m.FromUserID + return m.UserID } return "" } +func (m *GetBlacklistReq) GetPagination() *sdk_ws.RequestPagination { + if m != nil { + return m.Pagination + } + return nil +} + type GetBlacklistResp struct { BlackUserInfoList []*sdk_ws.PublicUserInfo `protobuf:"bytes,1,rep,name=BlackUserInfoList" json:"BlackUserInfoList,omitempty"` + Total int32 `protobuf:"varint,2,opt,name=total" json:"total,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -645,7 +662,7 @@ func (m *GetBlacklistResp) Reset() { *m = GetBlacklistResp{} } func (m *GetBlacklistResp) String() string { return proto.CompactTextString(m) } func (*GetBlacklistResp) ProtoMessage() {} func (*GetBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{15} + return fileDescriptor_friend_971ef02230ce9e85, []int{15} } func (m *GetBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistResp.Unmarshal(m, b) @@ -672,9 +689,16 @@ func (m *GetBlacklistResp) GetBlackUserInfoList() []*sdk_ws.PublicUserInfo { return nil } +func (m *GetBlacklistResp) GetTotal() int32 { + if m != nil { + return m.Total + } + return 0 +} + type IsFriendReq struct { - ToUserID string `protobuf:"bytes,1,opt,name=ToUserID" json:"ToUserID,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"` + FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` + ToUserID string `protobuf:"bytes,2,opt,name=toUserID" json:"toUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -684,7 +708,7 @@ func (m *IsFriendReq) Reset() { *m = IsFriendReq{} } func (m *IsFriendReq) String() string { return proto.CompactTextString(m) } func (*IsFriendReq) ProtoMessage() {} func (*IsFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{16} + return fileDescriptor_friend_971ef02230ce9e85, []int{16} } func (m *IsFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendReq.Unmarshal(m, b) @@ -704,16 +728,16 @@ func (m *IsFriendReq) XXX_DiscardUnknown() { var xxx_messageInfo_IsFriendReq proto.InternalMessageInfo -func (m *IsFriendReq) GetToUserID() string { +func (m *IsFriendReq) GetFromUserID() string { if m != nil { - return m.ToUserID + return m.FromUserID } return "" } -func (m *IsFriendReq) GetFromUserID() string { +func (m *IsFriendReq) GetToUserID() string { if m != nil { - return m.FromUserID + return m.ToUserID } return "" } @@ -729,7 +753,7 @@ func (m *IsFriendResp) Reset() { *m = IsFriendResp{} } func (m *IsFriendResp) String() string { return proto.CompactTextString(m) } func (*IsFriendResp) ProtoMessage() {} func (*IsFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{17} + return fileDescriptor_friend_971ef02230ce9e85, []int{17} } func (m *IsFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendResp.Unmarshal(m, b) @@ -757,8 +781,8 @@ func (m *IsFriendResp) GetResponse() bool { } type IsInBlackListReq struct { - ToUserID string `protobuf:"bytes,1,opt,name=ToUserID" json:"ToUserID,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"` + FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` + ToUserID string `protobuf:"bytes,2,opt,name=toUserID" json:"toUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -768,7 +792,7 @@ func (m *IsInBlackListReq) Reset() { *m = IsInBlackListReq{} } func (m *IsInBlackListReq) String() string { return proto.CompactTextString(m) } func (*IsInBlackListReq) ProtoMessage() {} func (*IsInBlackListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{18} + return fileDescriptor_friend_971ef02230ce9e85, []int{18} } func (m *IsInBlackListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListReq.Unmarshal(m, b) @@ -788,16 +812,16 @@ func (m *IsInBlackListReq) XXX_DiscardUnknown() { var xxx_messageInfo_IsInBlackListReq proto.InternalMessageInfo -func (m *IsInBlackListReq) GetToUserID() string { +func (m *IsInBlackListReq) GetFromUserID() string { if m != nil { - return m.ToUserID + return m.FromUserID } return "" } -func (m *IsInBlackListReq) GetFromUserID() string { +func (m *IsInBlackListReq) GetToUserID() string { if m != nil { - return m.FromUserID + return m.ToUserID } return "" } @@ -813,7 +837,7 @@ func (m *IsInBlackListResp) Reset() { *m = IsInBlackListResp{} } func (m *IsInBlackListResp) String() string { return proto.CompactTextString(m) } func (*IsInBlackListResp) ProtoMessage() {} func (*IsInBlackListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{19} + return fileDescriptor_friend_971ef02230ce9e85, []int{19} } func (m *IsInBlackListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListResp.Unmarshal(m, b) @@ -841,8 +865,8 @@ func (m *IsInBlackListResp) GetResponse() bool { } type DeleteFriendReq struct { - ToUserID string `protobuf:"bytes,1,opt,name=ToUserID" json:"ToUserID,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"` + FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` + ToUserID string `protobuf:"bytes,2,opt,name=toUserID" json:"toUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -852,7 +876,7 @@ func (m *DeleteFriendReq) Reset() { *m = DeleteFriendReq{} } func (m *DeleteFriendReq) String() string { return proto.CompactTextString(m) } func (*DeleteFriendReq) ProtoMessage() {} func (*DeleteFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{20} + return fileDescriptor_friend_971ef02230ce9e85, []int{20} } func (m *DeleteFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteFriendReq.Unmarshal(m, b) @@ -872,16 +896,16 @@ func (m *DeleteFriendReq) XXX_DiscardUnknown() { var xxx_messageInfo_DeleteFriendReq proto.InternalMessageInfo -func (m *DeleteFriendReq) GetToUserID() string { +func (m *DeleteFriendReq) GetFromUserID() string { if m != nil { - return m.ToUserID + return m.FromUserID } return "" } -func (m *DeleteFriendReq) GetFromUserID() string { +func (m *DeleteFriendReq) GetToUserID() string { if m != nil { - return m.FromUserID + return m.ToUserID } return "" } @@ -896,7 +920,7 @@ func (m *DeleteFriendResp) Reset() { *m = DeleteFriendResp{} } func (m *DeleteFriendResp) String() string { return proto.CompactTextString(m) } func (*DeleteFriendResp) ProtoMessage() {} func (*DeleteFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{21} + return fileDescriptor_friend_971ef02230ce9e85, []int{21} } func (m *DeleteFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteFriendResp.Unmarshal(m, b) @@ -917,9 +941,9 @@ func (m *DeleteFriendResp) XXX_DiscardUnknown() { var xxx_messageInfo_DeleteFriendResp proto.InternalMessageInfo // process -type AddFriendResponseReq struct { - ToUserID string `protobuf:"bytes,1,opt,name=ToUserID" json:"ToUserID,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"` +type FriendApplyResponseReq struct { + FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` + ToUserID string `protobuf:"bytes,2,opt,name=toUserID" json:"toUserID,omitempty"` HandleResult int32 `protobuf:"varint,3,opt,name=handleResult" json:"handleResult,omitempty"` HandleMsg string `protobuf:"bytes,4,opt,name=handleMsg" json:"handleMsg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -927,92 +951,92 @@ type AddFriendResponseReq struct { XXX_sizecache int32 `json:"-"` } -func (m *AddFriendResponseReq) Reset() { *m = AddFriendResponseReq{} } -func (m *AddFriendResponseReq) String() string { return proto.CompactTextString(m) } -func (*AddFriendResponseReq) ProtoMessage() {} -func (*AddFriendResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{22} +func (m *FriendApplyResponseReq) Reset() { *m = FriendApplyResponseReq{} } +func (m *FriendApplyResponseReq) String() string { return proto.CompactTextString(m) } +func (*FriendApplyResponseReq) ProtoMessage() {} +func (*FriendApplyResponseReq) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_971ef02230ce9e85, []int{22} } -func (m *AddFriendResponseReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddFriendResponseReq.Unmarshal(m, b) +func (m *FriendApplyResponseReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendApplyResponseReq.Unmarshal(m, b) } -func (m *AddFriendResponseReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddFriendResponseReq.Marshal(b, m, deterministic) +func (m *FriendApplyResponseReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendApplyResponseReq.Marshal(b, m, deterministic) } -func (dst *AddFriendResponseReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddFriendResponseReq.Merge(dst, src) +func (dst *FriendApplyResponseReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendApplyResponseReq.Merge(dst, src) } -func (m *AddFriendResponseReq) XXX_Size() int { - return xxx_messageInfo_AddFriendResponseReq.Size(m) +func (m *FriendApplyResponseReq) XXX_Size() int { + return xxx_messageInfo_FriendApplyResponseReq.Size(m) } -func (m *AddFriendResponseReq) XXX_DiscardUnknown() { - xxx_messageInfo_AddFriendResponseReq.DiscardUnknown(m) +func (m *FriendApplyResponseReq) XXX_DiscardUnknown() { + xxx_messageInfo_FriendApplyResponseReq.DiscardUnknown(m) } -var xxx_messageInfo_AddFriendResponseReq proto.InternalMessageInfo +var xxx_messageInfo_FriendApplyResponseReq proto.InternalMessageInfo -func (m *AddFriendResponseReq) GetToUserID() string { - if m != nil { - return m.ToUserID - } - return "" -} - -func (m *AddFriendResponseReq) GetFromUserID() string { +func (m *FriendApplyResponseReq) GetFromUserID() string { if m != nil { return m.FromUserID } return "" } -func (m *AddFriendResponseReq) GetHandleResult() int32 { +func (m *FriendApplyResponseReq) GetToUserID() string { + if m != nil { + return m.ToUserID + } + return "" +} + +func (m *FriendApplyResponseReq) GetHandleResult() int32 { if m != nil { return m.HandleResult } return 0 } -func (m *AddFriendResponseReq) GetHandleMsg() string { +func (m *FriendApplyResponseReq) GetHandleMsg() string { if m != nil { return m.HandleMsg } return "" } -type AddFriendResponseResp struct { +type FriendApplyResponseResp struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *AddFriendResponseResp) Reset() { *m = AddFriendResponseResp{} } -func (m *AddFriendResponseResp) String() string { return proto.CompactTextString(m) } -func (*AddFriendResponseResp) ProtoMessage() {} -func (*AddFriendResponseResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{23} +func (m *FriendApplyResponseResp) Reset() { *m = FriendApplyResponseResp{} } +func (m *FriendApplyResponseResp) String() string { return proto.CompactTextString(m) } +func (*FriendApplyResponseResp) ProtoMessage() {} +func (*FriendApplyResponseResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_971ef02230ce9e85, []int{23} } -func (m *AddFriendResponseResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddFriendResponseResp.Unmarshal(m, b) +func (m *FriendApplyResponseResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendApplyResponseResp.Unmarshal(m, b) } -func (m *AddFriendResponseResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddFriendResponseResp.Marshal(b, m, deterministic) +func (m *FriendApplyResponseResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendApplyResponseResp.Marshal(b, m, deterministic) } -func (dst *AddFriendResponseResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddFriendResponseResp.Merge(dst, src) +func (dst *FriendApplyResponseResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendApplyResponseResp.Merge(dst, src) } -func (m *AddFriendResponseResp) XXX_Size() int { - return xxx_messageInfo_AddFriendResponseResp.Size(m) +func (m *FriendApplyResponseResp) XXX_Size() int { + return xxx_messageInfo_FriendApplyResponseResp.Size(m) } -func (m *AddFriendResponseResp) XXX_DiscardUnknown() { - xxx_messageInfo_AddFriendResponseResp.DiscardUnknown(m) +func (m *FriendApplyResponseResp) XXX_DiscardUnknown() { + xxx_messageInfo_FriendApplyResponseResp.DiscardUnknown(m) } -var xxx_messageInfo_AddFriendResponseResp proto.InternalMessageInfo +var xxx_messageInfo_FriendApplyResponseResp proto.InternalMessageInfo type SetFriendRemarkReq struct { - ToUserID string `protobuf:"bytes,1,opt,name=ToUserID" json:"ToUserID,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"` - Remark string `protobuf:"bytes,3,opt,name=Remark" json:"Remark,omitempty"` + FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` + ToUserID string `protobuf:"bytes,2,opt,name=toUserID" json:"toUserID,omitempty"` + Remark string `protobuf:"bytes,3,opt,name=remark" json:"remark,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1022,7 +1046,7 @@ func (m *SetFriendRemarkReq) Reset() { *m = SetFriendRemarkReq{} } func (m *SetFriendRemarkReq) String() string { return proto.CompactTextString(m) } func (*SetFriendRemarkReq) ProtoMessage() {} func (*SetFriendRemarkReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{24} + return fileDescriptor_friend_971ef02230ce9e85, []int{24} } func (m *SetFriendRemarkReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetFriendRemarkReq.Unmarshal(m, b) @@ -1042,16 +1066,16 @@ func (m *SetFriendRemarkReq) XXX_DiscardUnknown() { var xxx_messageInfo_SetFriendRemarkReq proto.InternalMessageInfo -func (m *SetFriendRemarkReq) GetToUserID() string { +func (m *SetFriendRemarkReq) GetFromUserID() string { if m != nil { - return m.ToUserID + return m.FromUserID } return "" } -func (m *SetFriendRemarkReq) GetFromUserID() string { +func (m *SetFriendRemarkReq) GetToUserID() string { if m != nil { - return m.FromUserID + return m.ToUserID } return "" } @@ -1073,7 +1097,7 @@ func (m *SetFriendRemarkResp) Reset() { *m = SetFriendRemarkResp{} } func (m *SetFriendRemarkResp) String() string { return proto.CompactTextString(m) } func (*SetFriendRemarkResp) ProtoMessage() {} func (*SetFriendRemarkResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{25} + return fileDescriptor_friend_971ef02230ce9e85, []int{25} } func (m *SetFriendRemarkResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetFriendRemarkResp.Unmarshal(m, b) @@ -1093,99 +1117,107 @@ func (m *SetFriendRemarkResp) XXX_DiscardUnknown() { var xxx_messageInfo_SetFriendRemarkResp proto.InternalMessageInfo -type GetSelfApplyListReq struct { - ToUserID string `protobuf:"bytes,1,opt,name=ToUserID" json:"ToUserID,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type GetFromFriendApplyListReq struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + Pagination *sdk_ws.RequestPagination `protobuf:"bytes,2,opt,name=pagination" json:"pagination,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetSelfApplyListReq) Reset() { *m = GetSelfApplyListReq{} } -func (m *GetSelfApplyListReq) String() string { return proto.CompactTextString(m) } -func (*GetSelfApplyListReq) ProtoMessage() {} -func (*GetSelfApplyListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{26} +func (m *GetFromFriendApplyListReq) Reset() { *m = GetFromFriendApplyListReq{} } +func (m *GetFromFriendApplyListReq) String() string { return proto.CompactTextString(m) } +func (*GetFromFriendApplyListReq) ProtoMessage() {} +func (*GetFromFriendApplyListReq) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_971ef02230ce9e85, []int{26} } -func (m *GetSelfApplyListReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetSelfApplyListReq.Unmarshal(m, b) +func (m *GetFromFriendApplyListReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetFromFriendApplyListReq.Unmarshal(m, b) } -func (m *GetSelfApplyListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetSelfApplyListReq.Marshal(b, m, deterministic) +func (m *GetFromFriendApplyListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetFromFriendApplyListReq.Marshal(b, m, deterministic) } -func (dst *GetSelfApplyListReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetSelfApplyListReq.Merge(dst, src) +func (dst *GetFromFriendApplyListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetFromFriendApplyListReq.Merge(dst, src) } -func (m *GetSelfApplyListReq) XXX_Size() int { - return xxx_messageInfo_GetSelfApplyListReq.Size(m) +func (m *GetFromFriendApplyListReq) XXX_Size() int { + return xxx_messageInfo_GetFromFriendApplyListReq.Size(m) } -func (m *GetSelfApplyListReq) XXX_DiscardUnknown() { - xxx_messageInfo_GetSelfApplyListReq.DiscardUnknown(m) +func (m *GetFromFriendApplyListReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetFromFriendApplyListReq.DiscardUnknown(m) } -var xxx_messageInfo_GetSelfApplyListReq proto.InternalMessageInfo +var xxx_messageInfo_GetFromFriendApplyListReq proto.InternalMessageInfo -func (m *GetSelfApplyListReq) GetToUserID() string { +func (m *GetFromFriendApplyListReq) GetUserID() string { if m != nil { - return m.ToUserID + return m.UserID } return "" } -func (m *GetSelfApplyListReq) GetFromUserID() string { +func (m *GetFromFriendApplyListReq) GetPagination() *sdk_ws.RequestPagination { if m != nil { - return m.FromUserID + return m.Pagination } - return "" + return nil } -type GetSelfApplyListResp struct { - FriendRequestList []*sdk_ws.FriendRequest `protobuf:"bytes,1,rep,name=FriendRequestList" json:"FriendRequestList,omitempty"` +type GetFromFriendApplyListResp struct { + FriendRequestList []*sdk_ws.FriendRequest `protobuf:"bytes,1,rep,name=friendRequestList" json:"friendRequestList,omitempty"` + Total int32 `protobuf:"varint,2,opt,name=total" json:"total,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *GetSelfApplyListResp) Reset() { *m = GetSelfApplyListResp{} } -func (m *GetSelfApplyListResp) String() string { return proto.CompactTextString(m) } -func (*GetSelfApplyListResp) ProtoMessage() {} -func (*GetSelfApplyListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ee3ed328aecab868, []int{27} +func (m *GetFromFriendApplyListResp) Reset() { *m = GetFromFriendApplyListResp{} } +func (m *GetFromFriendApplyListResp) String() string { return proto.CompactTextString(m) } +func (*GetFromFriendApplyListResp) ProtoMessage() {} +func (*GetFromFriendApplyListResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_971ef02230ce9e85, []int{27} } -func (m *GetSelfApplyListResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetSelfApplyListResp.Unmarshal(m, b) +func (m *GetFromFriendApplyListResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetFromFriendApplyListResp.Unmarshal(m, b) } -func (m *GetSelfApplyListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetSelfApplyListResp.Marshal(b, m, deterministic) +func (m *GetFromFriendApplyListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetFromFriendApplyListResp.Marshal(b, m, deterministic) } -func (dst *GetSelfApplyListResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetSelfApplyListResp.Merge(dst, src) +func (dst *GetFromFriendApplyListResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetFromFriendApplyListResp.Merge(dst, src) } -func (m *GetSelfApplyListResp) XXX_Size() int { - return xxx_messageInfo_GetSelfApplyListResp.Size(m) +func (m *GetFromFriendApplyListResp) XXX_Size() int { + return xxx_messageInfo_GetFromFriendApplyListResp.Size(m) } -func (m *GetSelfApplyListResp) XXX_DiscardUnknown() { - xxx_messageInfo_GetSelfApplyListResp.DiscardUnknown(m) +func (m *GetFromFriendApplyListResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetFromFriendApplyListResp.DiscardUnknown(m) } -var xxx_messageInfo_GetSelfApplyListResp proto.InternalMessageInfo +var xxx_messageInfo_GetFromFriendApplyListResp proto.InternalMessageInfo -func (m *GetSelfApplyListResp) GetFriendRequestList() []*sdk_ws.FriendRequest { +func (m *GetFromFriendApplyListResp) GetFriendRequestList() []*sdk_ws.FriendRequest { if m != nil { return m.FriendRequestList } return nil } +func (m *GetFromFriendApplyListResp) GetTotal() int32 { + if m != nil { + return m.Total + } + return 0 +} + func init() { proto.RegisterType((*GetFriendsInfoReq)(nil), "friend.GetFriendsInfoReq") - proto.RegisterType((*GetFriendInfoResp)(nil), "friend.GetFriendInfoResp") + proto.RegisterType((*GetFriendsInfoResp)(nil), "friend.GetFriendsInfoResp") proto.RegisterType((*AddFriendReq)(nil), "friend.AddFriendReq") proto.RegisterType((*AddFriendResp)(nil), "friend.AddFriendResp") proto.RegisterType((*ImportFriendReq)(nil), "friend.ImportFriendReq") proto.RegisterType((*ImportFriendResp)(nil), "friend.ImportFriendResp") - proto.RegisterType((*GetFriendApplyListReq)(nil), "friend.GetFriendApplyListReq") - proto.RegisterType((*GetFriendApplyListResp)(nil), "friend.GetFriendApplyListResp") + proto.RegisterType((*GetToFriendApplyListReq)(nil), "friend.GetToFriendApplyListReq") + proto.RegisterType((*GetToFriendApplyListResp)(nil), "friend.GetToFriendApplyListResp") proto.RegisterType((*GetFriendListReq)(nil), "friend.GetFriendListReq") proto.RegisterType((*GetFriendListResp)(nil), "friend.GetFriendListResp") proto.RegisterType((*AddBlacklistReq)(nil), "friend.AddBlacklistReq") @@ -1200,12 +1232,12 @@ func init() { proto.RegisterType((*IsInBlackListResp)(nil), "friend.IsInBlackListResp") proto.RegisterType((*DeleteFriendReq)(nil), "friend.DeleteFriendReq") proto.RegisterType((*DeleteFriendResp)(nil), "friend.DeleteFriendResp") - proto.RegisterType((*AddFriendResponseReq)(nil), "friend.AddFriendResponseReq") - proto.RegisterType((*AddFriendResponseResp)(nil), "friend.AddFriendResponseResp") + proto.RegisterType((*FriendApplyResponseReq)(nil), "friend.FriendApplyResponseReq") + proto.RegisterType((*FriendApplyResponseResp)(nil), "friend.FriendApplyResponseResp") proto.RegisterType((*SetFriendRemarkReq)(nil), "friend.SetFriendRemarkReq") proto.RegisterType((*SetFriendRemarkResp)(nil), "friend.SetFriendRemarkResp") - proto.RegisterType((*GetSelfApplyListReq)(nil), "friend.GetSelfApplyListReq") - proto.RegisterType((*GetSelfApplyListResp)(nil), "friend.GetSelfApplyListResp") + proto.RegisterType((*GetFromFriendApplyListReq)(nil), "friend.GetFromFriendApplyListReq") + proto.RegisterType((*GetFromFriendApplyListResp)(nil), "friend.GetFromFriendApplyListResp") } // Reference imports to suppress errors if they are not otherwise used. @@ -1219,19 +1251,34 @@ const _ = grpc.SupportPackageIsVersion4 // Client API for Friend service type FriendClient interface { + // 申请加好友 AddFriend(ctx context.Context, in *AddFriendReq, opts ...grpc.CallOption) (*AddFriendResp, error) - GetFriendApplyList(ctx context.Context, in *GetFriendApplyListReq, opts ...grpc.CallOption) (*GetFriendApplyListResp, error) - GetSelfApplyList(ctx context.Context, in *GetSelfApplyListReq, opts ...grpc.CallOption) (*GetSelfApplyListResp, error) + // 获取收到的好友申请列表 + GetToFriendApplyList(ctx context.Context, in *GetToFriendApplyListReq, opts ...grpc.CallOption) (*GetToFriendApplyListResp, error) + // 获取主动发出去的好友申请列表 + GetFromFriendApplyList(ctx context.Context, in *GetFromFriendApplyListReq, opts ...grpc.CallOption) (*GetFromFriendApplyListResp, error) + // 获取好友列表 GetFriendList(ctx context.Context, in *GetFriendListReq, opts ...grpc.CallOption) (*GetFriendListResp, error) + // 添加黑名单 AddBlacklist(ctx context.Context, in *AddBlacklistReq, opts ...grpc.CallOption) (*AddBlacklistResp, error) + // 移除黑名单 RemoveBlacklist(ctx context.Context, in *RemoveBlacklistReq, opts ...grpc.CallOption) (*RemoveBlacklistResp, error) + // 判断是否好友关系 IsFriend(ctx context.Context, in *IsFriendReq, opts ...grpc.CallOption) (*IsFriendResp, error) + // 判断是否在黑名单中 IsInBlackList(ctx context.Context, in *IsInBlackListReq, opts ...grpc.CallOption) (*IsInBlackListResp, error) + // 获取黑名单列表 GetBlacklist(ctx context.Context, in *GetBlacklistReq, opts ...grpc.CallOption) (*GetBlacklistResp, error) + // 删除好友 DeleteFriend(ctx context.Context, in *DeleteFriendReq, opts ...grpc.CallOption) (*DeleteFriendResp, error) - AddFriendResponse(ctx context.Context, in *AddFriendResponseReq, opts ...grpc.CallOption) (*AddFriendResponseResp, error) + // 对好友申请响应(同意或拒绝) + FriendApplyResponse(ctx context.Context, in *FriendApplyResponseReq, opts ...grpc.CallOption) (*FriendApplyResponseResp, error) + // 设置好友备注 SetFriendRemark(ctx context.Context, in *SetFriendRemarkReq, opts ...grpc.CallOption) (*SetFriendRemarkResp, error) + // 导入好友关系 ImportFriend(ctx context.Context, in *ImportFriendReq, opts ...grpc.CallOption) (*ImportFriendResp, error) + // 获取指定好友信息 + GetFriendsInfo(ctx context.Context, in *GetFriendsInfoReq, opts ...grpc.CallOption) (*GetFriendsInfoResp, error) } type friendClient struct { @@ -1251,18 +1298,18 @@ func (c *friendClient) AddFriend(ctx context.Context, in *AddFriendReq, opts ... return out, nil } -func (c *friendClient) GetFriendApplyList(ctx context.Context, in *GetFriendApplyListReq, opts ...grpc.CallOption) (*GetFriendApplyListResp, error) { - out := new(GetFriendApplyListResp) - err := grpc.Invoke(ctx, "/friend.friend/getFriendApplyList", in, out, c.cc, opts...) +func (c *friendClient) GetToFriendApplyList(ctx context.Context, in *GetToFriendApplyListReq, opts ...grpc.CallOption) (*GetToFriendApplyListResp, error) { + out := new(GetToFriendApplyListResp) + err := grpc.Invoke(ctx, "/friend.friend/getToFriendApplyList", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *friendClient) GetSelfApplyList(ctx context.Context, in *GetSelfApplyListReq, opts ...grpc.CallOption) (*GetSelfApplyListResp, error) { - out := new(GetSelfApplyListResp) - err := grpc.Invoke(ctx, "/friend.friend/getSelfApplyList", in, out, c.cc, opts...) +func (c *friendClient) GetFromFriendApplyList(ctx context.Context, in *GetFromFriendApplyListReq, opts ...grpc.CallOption) (*GetFromFriendApplyListResp, error) { + out := new(GetFromFriendApplyListResp) + err := grpc.Invoke(ctx, "/friend.friend/getFromFriendApplyList", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1332,9 +1379,9 @@ func (c *friendClient) DeleteFriend(ctx context.Context, in *DeleteFriendReq, op return out, nil } -func (c *friendClient) AddFriendResponse(ctx context.Context, in *AddFriendResponseReq, opts ...grpc.CallOption) (*AddFriendResponseResp, error) { - out := new(AddFriendResponseResp) - err := grpc.Invoke(ctx, "/friend.friend/addFriendResponse", in, out, c.cc, opts...) +func (c *friendClient) FriendApplyResponse(ctx context.Context, in *FriendApplyResponseReq, opts ...grpc.CallOption) (*FriendApplyResponseResp, error) { + out := new(FriendApplyResponseResp) + err := grpc.Invoke(ctx, "/friend.friend/friendApplyResponse", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1359,22 +1406,46 @@ func (c *friendClient) ImportFriend(ctx context.Context, in *ImportFriendReq, op return out, nil } +func (c *friendClient) GetFriendsInfo(ctx context.Context, in *GetFriendsInfoReq, opts ...grpc.CallOption) (*GetFriendsInfoResp, error) { + out := new(GetFriendsInfoResp) + err := grpc.Invoke(ctx, "/friend.friend/getFriendsInfo", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // Server API for Friend service type FriendServer interface { + // 申请加好友 AddFriend(context.Context, *AddFriendReq) (*AddFriendResp, error) - GetFriendApplyList(context.Context, *GetFriendApplyListReq) (*GetFriendApplyListResp, error) - GetSelfApplyList(context.Context, *GetSelfApplyListReq) (*GetSelfApplyListResp, error) + // 获取收到的好友申请列表 + GetToFriendApplyList(context.Context, *GetToFriendApplyListReq) (*GetToFriendApplyListResp, error) + // 获取主动发出去的好友申请列表 + GetFromFriendApplyList(context.Context, *GetFromFriendApplyListReq) (*GetFromFriendApplyListResp, error) + // 获取好友列表 GetFriendList(context.Context, *GetFriendListReq) (*GetFriendListResp, error) + // 添加黑名单 AddBlacklist(context.Context, *AddBlacklistReq) (*AddBlacklistResp, error) + // 移除黑名单 RemoveBlacklist(context.Context, *RemoveBlacklistReq) (*RemoveBlacklistResp, error) + // 判断是否好友关系 IsFriend(context.Context, *IsFriendReq) (*IsFriendResp, error) + // 判断是否在黑名单中 IsInBlackList(context.Context, *IsInBlackListReq) (*IsInBlackListResp, error) + // 获取黑名单列表 GetBlacklist(context.Context, *GetBlacklistReq) (*GetBlacklistResp, error) + // 删除好友 DeleteFriend(context.Context, *DeleteFriendReq) (*DeleteFriendResp, error) - AddFriendResponse(context.Context, *AddFriendResponseReq) (*AddFriendResponseResp, error) + // 对好友申请响应(同意或拒绝) + FriendApplyResponse(context.Context, *FriendApplyResponseReq) (*FriendApplyResponseResp, error) + // 设置好友备注 SetFriendRemark(context.Context, *SetFriendRemarkReq) (*SetFriendRemarkResp, error) + // 导入好友关系 ImportFriend(context.Context, *ImportFriendReq) (*ImportFriendResp, error) + // 获取指定好友信息 + GetFriendsInfo(context.Context, *GetFriendsInfoReq) (*GetFriendsInfoResp, error) } func RegisterFriendServer(s *grpc.Server, srv FriendServer) { @@ -1399,38 +1470,38 @@ func _Friend_AddFriend_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Friend_GetFriendApplyList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetFriendApplyListReq) +func _Friend_GetToFriendApplyList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetToFriendApplyListReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(FriendServer).GetFriendApplyList(ctx, in) + return srv.(FriendServer).GetToFriendApplyList(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/friend.friend/GetFriendApplyList", + FullMethod: "/friend.friend/GetToFriendApplyList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).GetFriendApplyList(ctx, req.(*GetFriendApplyListReq)) + return srv.(FriendServer).GetToFriendApplyList(ctx, req.(*GetToFriendApplyListReq)) } return interceptor(ctx, in, info, handler) } -func _Friend_GetSelfApplyList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSelfApplyListReq) +func _Friend_GetFromFriendApplyList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFromFriendApplyListReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(FriendServer).GetSelfApplyList(ctx, in) + return srv.(FriendServer).GetFromFriendApplyList(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/friend.friend/GetSelfApplyList", + FullMethod: "/friend.friend/GetFromFriendApplyList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).GetSelfApplyList(ctx, req.(*GetSelfApplyListReq)) + return srv.(FriendServer).GetFromFriendApplyList(ctx, req.(*GetFromFriendApplyListReq)) } return interceptor(ctx, in, info, handler) } @@ -1561,20 +1632,20 @@ func _Friend_DeleteFriend_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Friend_AddFriendResponse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddFriendResponseReq) +func _Friend_FriendApplyResponse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FriendApplyResponseReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(FriendServer).AddFriendResponse(ctx, in) + return srv.(FriendServer).FriendApplyResponse(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/friend.friend/AddFriendResponse", + FullMethod: "/friend.friend/FriendApplyResponse", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).AddFriendResponse(ctx, req.(*AddFriendResponseReq)) + return srv.(FriendServer).FriendApplyResponse(ctx, req.(*FriendApplyResponseReq)) } return interceptor(ctx, in, info, handler) } @@ -1615,6 +1686,24 @@ func _Friend_ImportFriend_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Friend_GetFriendsInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFriendsInfoReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FriendServer).GetFriendsInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/friend.friend/GetFriendsInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FriendServer).GetFriendsInfo(ctx, req.(*GetFriendsInfoReq)) + } + return interceptor(ctx, in, info, handler) +} + var _Friend_serviceDesc = grpc.ServiceDesc{ ServiceName: "friend.friend", HandlerType: (*FriendServer)(nil), @@ -1624,12 +1713,12 @@ var _Friend_serviceDesc = grpc.ServiceDesc{ Handler: _Friend_AddFriend_Handler, }, { - MethodName: "getFriendApplyList", - Handler: _Friend_GetFriendApplyList_Handler, + MethodName: "getToFriendApplyList", + Handler: _Friend_GetToFriendApplyList_Handler, }, { - MethodName: "getSelfApplyList", - Handler: _Friend_GetSelfApplyList_Handler, + MethodName: "getFromFriendApplyList", + Handler: _Friend_GetFromFriendApplyList_Handler, }, { MethodName: "getFriendList", @@ -1660,8 +1749,8 @@ var _Friend_serviceDesc = grpc.ServiceDesc{ Handler: _Friend_DeleteFriend_Handler, }, { - MethodName: "addFriendResponse", - Handler: _Friend_AddFriendResponse_Handler, + MethodName: "friendApplyResponse", + Handler: _Friend_FriendApplyResponse_Handler, }, { MethodName: "setFriendRemark", @@ -1671,63 +1760,74 @@ var _Friend_serviceDesc = grpc.ServiceDesc{ MethodName: "importFriend", Handler: _Friend_ImportFriend_Handler, }, + { + MethodName: "getFriendsInfo", + Handler: _Friend_GetFriendsInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "friend/friend.proto", } -func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_ee3ed328aecab868) } +func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_971ef02230ce9e85) } -var fileDescriptor_friend_ee3ed328aecab868 = []byte{ - // 790 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4b, 0x4f, 0xdb, 0x4e, - 0x10, 0x57, 0xfe, 0xfc, 0x4b, 0xc9, 0x10, 0x9a, 0x64, 0x92, 0x40, 0x6a, 0x1e, 0x85, 0x3d, 0x21, - 0x24, 0x12, 0x95, 0xaa, 0x52, 0xa5, 0xaa, 0x87, 0x50, 0x0a, 0x72, 0xd5, 0x00, 0x75, 0xda, 0x0b, - 0x52, 0x15, 0x99, 0x78, 0x13, 0xa2, 0x38, 0xf1, 0xe2, 0x31, 0xa0, 0x7e, 0x8f, 0xde, 0xfb, 0x55, - 0x2b, 0x3f, 0x62, 0xaf, 0x1f, 0x81, 0x03, 0x3e, 0x59, 0xf3, 0xfa, 0xcd, 0xec, 0xcc, 0xfa, 0xb7, - 0x03, 0xb5, 0xa1, 0x3d, 0xe6, 0x33, 0xa3, 0xed, 0x7f, 0x5a, 0xc2, 0xb6, 0x1c, 0x0b, 0x97, 0x7d, - 0x49, 0xd9, 0xbf, 0x10, 0x7c, 0x76, 0xa8, 0x76, 0x0f, 0x7b, 0xdc, 0xbe, 0xe7, 0x76, 0x5b, 0x4c, - 0x46, 0x6d, 0xcf, 0xa3, 0x4d, 0xc6, 0xa4, 0xff, 0x40, 0xed, 0x07, 0xf2, 0x23, 0xd8, 0x05, 0x54, - 0xcf, 0xb8, 0x73, 0xea, 0x85, 0x91, 0x3a, 0x1b, 0x5a, 0x1a, 0xbf, 0x45, 0x05, 0x56, 0x7e, 0x58, - 0x3f, 0x89, 0xdb, 0xea, 0x49, 0xb3, 0xb0, 0x5b, 0xd8, 0x2f, 0x6a, 0xa1, 0x8c, 0x3b, 0x00, 0xa7, - 0xb6, 0x35, 0x0d, 0xac, 0xff, 0x79, 0x56, 0x49, 0xc3, 0xae, 0x24, 0x40, 0x1f, 0x8f, 0x04, 0x7e, - 0x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 0x69, - 0xc8, 0xfc, 0x69, 0xf5, 0xe8, 0xef, 0x4b, 0x08, 0xd6, 0x03, 0xfc, 0x00, 0x45, 0x7d, 0xde, 0x5f, - 0xac, 0xb7, 0x82, 0x15, 0x42, 0x7e, 0x5a, 0x95, 0x46, 0x86, 0x96, 0x04, 0xf6, 0x00, 0x47, 0xa9, - 0x57, 0x00, 0xb7, 0xe7, 0xce, 0x99, 0xcf, 0x8e, 0xb2, 0xf3, 0x98, 0x99, 0x04, 0x76, 0xa1, 0x32, - 0x4a, 0x74, 0x00, 0x37, 0xa5, 0x98, 0x64, 0xbb, 0x95, 0xad, 0xc5, 0x46, 0x12, 0x78, 0x02, 0x6b, - 0x23, 0x99, 0xef, 0xb1, 0x99, 0xca, 0x3f, 0x07, 0x7a, 0xbd, 0xc0, 0x42, 0x02, 0x3b, 0x50, 0xd2, - 0x25, 0x2a, 0xc6, 0x0d, 0xa9, 0x21, 0x32, 0x47, 0x2a, 0xcd, 0x6c, 0x03, 0x09, 0xfc, 0x0a, 0x65, - 0x3b, 0xce, 0xb3, 0xa8, 0xcc, 0x9d, 0xd3, 0x94, 0xae, 0x6c, 0x2e, 0xb4, 0x91, 0xc0, 0xf7, 0xb0, - 0x32, 0x0e, 0x98, 0x0b, 0x6b, 0x73, 0x47, 0x89, 0x16, 0x95, 0x7a, 0x5a, 0xe9, 0xf7, 0x62, 0x2c, - 0x93, 0x4e, 0xd4, 0x8b, 0x24, 0xb7, 0x45, 0xbd, 0x48, 0xb3, 0x54, 0x07, 0x4a, 0x23, 0x89, 0xe6, - 0xa3, 0x5e, 0x24, 0xde, 0x0b, 0xa5, 0x99, 0x6d, 0xf0, 0x21, 0x0c, 0x89, 0x7d, 0x22, 0x88, 0x04, - 0xc5, 0x45, 0x10, 0x49, 0xb2, 0xc2, 0x4b, 0xa8, 0xea, 0x49, 0x56, 0xc0, 0xad, 0xcc, 0x7b, 0x1a, - 0xd0, 0x98, 0xb2, 0xfd, 0x88, 0xd5, 0x1f, 0x10, 0xc5, 0x7f, 0xf2, 0x68, 0x40, 0x69, 0x9e, 0x89, - 0x06, 0x94, 0xc1, 0x0c, 0xee, 0x01, 0xc7, 0xd2, 0x22, 0x16, 0x1d, 0x30, 0xb1, 0xfd, 0x45, 0x07, - 0x4c, 0xee, 0x6d, 0xc7, 0x7b, 0x57, 0x6f, 0xdc, 0xbd, 0xbd, 0xaf, 0x76, 0xa5, 0x85, 0xdd, 0x77, - 0xfe, 0xe8, 0x7f, 0xae, 0x97, 0x3d, 0xe5, 0xbb, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xab, - 0x18, 0x07, 0xfe, 0x0b, 0x00, 0x00, +var fileDescriptor_friend_971ef02230ce9e85 = []byte{ + // 899 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x5f, 0x6f, 0xdb, 0x36, + 0x10, 0x87, 0x93, 0x25, 0x88, 0x2f, 0x6e, 0xed, 0x5c, 0xd2, 0x44, 0xd1, 0xb6, 0xc6, 0x21, 0xf6, + 0x10, 0x14, 0x68, 0x0c, 0x64, 0x18, 0x30, 0x60, 0x4f, 0x2e, 0xb2, 0x06, 0x1a, 0xea, 0x36, 0x53, + 0xb7, 0x01, 0xdb, 0x30, 0x18, 0x4a, 0x4d, 0xbb, 0x42, 0x64, 0x89, 0xd1, 0xc9, 0x0d, 0xf2, 0x36, + 0xec, 0x61, 0x1f, 0x61, 0x9f, 0x77, 0x10, 0x69, 0x89, 0xd4, 0xbf, 0xb6, 0x68, 0xbc, 0x3d, 0xc9, + 0x3c, 0xde, 0xff, 0xa3, 0x7f, 0x3f, 0x12, 0x76, 0xa7, 0xb1, 0xcf, 0xc3, 0xc9, 0x40, 0x7d, 0x4e, + 0x45, 0x1c, 0x25, 0x11, 0x6e, 0xaa, 0x95, 0x7d, 0xf2, 0x4a, 0xf0, 0xf0, 0xa9, 0x33, 0x7a, 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 0xcc, 0xf2, 0x3d, 0x17, 0x2f, + 0xe0, 0xe1, 0xac, 0xf0, 0x58, 0xc0, 0xea, 0x29, 0xcd, 0xde, 0x25, 0xb6, 0xdd, 0xb4, 0x45, 0xe2, + 0xd9, 0xf1, 0x6f, 0x47, 0xe9, 0xa3, 0x67, 0xec, 0x8c, 0x8c, 0xd7, 0x8e, 0x52, 0xff, 0x4e, 0x7d, + 0xae, 0x36, 0xa5, 0xf0, 0xeb, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x03, 0x49, 0x98, 0x1f, 0x3b, + 0x0d, 0x00, 0x00, } diff --git a/pkg/proto/friend/friend.proto b/pkg/proto/friend/friend.proto index 56158cb11..b49d303b2 100644 --- a/pkg/proto/friend/friend.proto +++ b/pkg/proto/friend/friend.proto @@ -4,21 +4,20 @@ option go_package = "Open_IM/pkg/proto/friend;friend"; package friend; message GetFriendsInfoReq{ - string ToUserID = 1; - string FromUserID = 2; + string fromUserID = 1; + repeated string toUserIDs = 2; } -message GetFriendInfoResp{ +message GetFriendsInfoResp{ repeated server_api_params.FriendInfo FriendInfoList = 1; } message AddFriendReq{ - string ToUserID = 1; - string FromUserID = 2; - string ReqMsg = 3; + string fromUserID = 1; + string toUserID = 2; + string reqMsg = 3; } message AddFriendResp{ - server_api_params.CommonResp commonResp = 1; } @@ -31,115 +30,131 @@ message ImportFriendResp{ } -message GetFriendApplyListReq{ - string ToUserID = 1; - string FromUserID = 2; +message GetToFriendApplyListReq{ + string userID = 1; + server_api_params.RequestPagination pagination = 2; + } -message GetFriendApplyListResp{ +message GetToFriendApplyListResp{ repeated server_api_params.FriendRequest FriendRequestList = 1; + int32 total = 2; } message GetFriendListReq{ - string ToUserID = 1; - string FromUserID = 2; + server_api_params.RequestPagination pagination = 1; + string userID = 2; } message GetFriendListResp{ repeated server_api_params.FriendInfo FriendInfoList = 1; + int32 total = 2; } message AddBlacklistReq{ - string ToUserID = 1; - string FromUserID = 2; + string fromUserID = 1; + string toUserID = 2; } message AddBlacklistResp{ - } message RemoveBlacklistReq{ - string ToUserID = 1; - string FromUserID = 2; + string fromUserID = 1; + string toUserID = 2; } message RemoveBlacklistResp{ - } message GetBlacklistReq{ - string FromUserID = 1; + string userID = 1; + server_api_params.RequestPagination pagination = 2; } message GetBlacklistResp{ repeated server_api_params.PublicUserInfo BlackUserInfoList = 1; + int32 total = 2; } message IsFriendReq{ - string ToUserID = 1; - string FromUserID = 2; + string fromUserID = 1; + string toUserID = 2; } message IsFriendResp{ - bool Response = 1; + bool Response = 1; } message IsInBlackListReq{ - string ToUserID = 1; - string FromUserID = 2; + string fromUserID = 1; + string toUserID = 2; } message IsInBlackListResp{ - bool Response = 1; + bool Response = 1; } message DeleteFriendReq{ - string ToUserID = 1; - string FromUserID = 2; + string fromUserID = 1; + string toUserID = 2; } message DeleteFriendResp{ - } //process -message AddFriendResponseReq{ - string ToUserID = 1; - string FromUserID = 2; +message FriendApplyResponseReq{ + string fromUserID = 1; + string toUserID = 2; int32 handleResult = 3; string handleMsg = 4; } -message AddFriendResponseResp{ - +message FriendApplyResponseResp{ } message SetFriendRemarkReq{ - string ToUserID = 1; - string FromUserID = 2; - string Remark = 3; + string fromUserID = 1; + string toUserID = 2; + string remark = 3; } message SetFriendRemarkResp{ - } -message GetSelfApplyListReq{ - string ToUserID = 1; - string FromUserID = 2; +message GetFromFriendApplyListReq{ + string userID = 1; + server_api_params.RequestPagination pagination = 2; } -message GetSelfApplyListResp{ - repeated server_api_params.FriendRequest FriendRequestList = 1; +message GetFromFriendApplyListResp{ + repeated server_api_params.FriendRequest friendRequestList = 1; + int32 total = 2; } service friend{ + //申请加好友 rpc addFriend(AddFriendReq) returns(AddFriendResp); - rpc getFriendApplyList(GetFriendApplyListReq) returns(GetFriendApplyListResp); - rpc getSelfApplyList(GetSelfApplyListReq) returns(GetSelfApplyListResp); + //获取收到的好友申请列表 + rpc getToFriendApplyList(GetToFriendApplyListReq) returns(GetToFriendApplyListResp); + //获取主动发出去的好友申请列表 + rpc getFromFriendApplyList(GetFromFriendApplyListReq) returns(GetFromFriendApplyListResp); + //获取好友列表 rpc getFriendList(GetFriendListReq) returns(GetFriendListResp); + //添加黑名单 rpc addBlacklist(AddBlacklistReq) returns(AddBlacklistResp); + //移除黑名单 rpc removeBlacklist(RemoveBlacklistReq) returns(RemoveBlacklistResp); + //判断是否好友关系 rpc isFriend(IsFriendReq) returns(IsFriendResp); + //判断是否在黑名单中 rpc isInBlackList(IsInBlackListReq) returns(IsInBlackListResp); + //获取黑名单列表 rpc getBlacklist(GetBlacklistReq) returns(GetBlacklistResp); + //删除好友 rpc deleteFriend(DeleteFriendReq) returns(DeleteFriendResp); - rpc addFriendResponse(AddFriendResponseReq) returns(AddFriendResponseResp); + //对好友申请响应(同意或拒绝) + rpc friendApplyResponse(FriendApplyResponseReq) returns(FriendApplyResponseResp); + //设置好友备注 rpc setFriendRemark(SetFriendRemarkReq) returns(SetFriendRemarkResp); + //导入好友关系 rpc importFriend(ImportFriendReq) returns(ImportFriendResp); + //获取指定好友信息 + rpc getFriendsInfo(GetFriendsInfoReq) returns (GetFriendsInfoResp); } \ No newline at end of file diff --git a/pkg/proto/group/group.pb.go b/pkg/proto/group/group.pb.go index e720801c7..129256e07 100644 --- a/pkg/proto/group/group.pb.go +++ b/pkg/proto/group/group.pb.go @@ -29,7 +29,7 @@ type CreateGroupReq struct { InitMemberList []string `protobuf:"bytes,1,rep,name=initMemberList" json:"initMemberList,omitempty"` GroupInfo *sdk_ws.GroupInfo `protobuf:"bytes,2,opt,name=groupInfo" json:"groupInfo,omitempty"` AdminUserIDs []string `protobuf:"bytes,3,rep,name=adminUserIDs" json:"adminUserIDs,omitempty"` - OwnerUserID string `protobuf:"bytes,5,opt,name=ownerUserID" json:"ownerUserID,omitempty"` + OwnerUserID string `protobuf:"bytes,4,opt,name=ownerUserID" json:"ownerUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -39,7 +39,7 @@ func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} } func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) } func (*CreateGroupReq) ProtoMessage() {} func (*CreateGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{0} + return fileDescriptor_group_19947c3109871c24, []int{0} } func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b) @@ -88,7 +88,7 @@ func (m *CreateGroupReq) GetOwnerUserID() string { } type CreateGroupResp struct { - GroupInfo *sdk_ws.GroupInfo `protobuf:"bytes,3,opt,name=groupInfo" json:"groupInfo,omitempty"` + GroupInfo *sdk_ws.GroupInfo `protobuf:"bytes,1,opt,name=groupInfo" json:"groupInfo,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -98,7 +98,7 @@ func (m *CreateGroupResp) Reset() { *m = CreateGroupResp{} } func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) } func (*CreateGroupResp) ProtoMessage() {} func (*CreateGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{1} + return fileDescriptor_group_19947c3109871c24, []int{1} } func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b) @@ -126,7 +126,7 @@ func (m *CreateGroupResp) GetGroupInfo() *sdk_ws.GroupInfo { } type GetGroupsInfoReq struct { - GroupIDList []string `protobuf:"bytes,1,rep,name=groupIDList" json:"groupIDList,omitempty"` + GroupIDs []string `protobuf:"bytes,1,rep,name=groupIDs" json:"groupIDs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -136,7 +136,7 @@ func (m *GetGroupsInfoReq) Reset() { *m = GetGroupsInfoReq{} } func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoReq) ProtoMessage() {} func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{2} + return fileDescriptor_group_19947c3109871c24, []int{2} } func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b) @@ -156,15 +156,15 @@ func (m *GetGroupsInfoReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupsInfoReq proto.InternalMessageInfo -func (m *GetGroupsInfoReq) GetGroupIDList() []string { +func (m *GetGroupsInfoReq) GetGroupIDs() []string { if m != nil { - return m.GroupIDList + return m.GroupIDs } return nil } type GetGroupsInfoResp struct { - GroupInfoList []*sdk_ws.GroupInfo `protobuf:"bytes,3,rep,name=groupInfoList" json:"groupInfoList,omitempty"` + GroupInfos []*sdk_ws.GroupInfo `protobuf:"bytes,1,rep,name=groupInfos" json:"groupInfos,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -174,7 +174,7 @@ func (m *GetGroupsInfoResp) Reset() { *m = GetGroupsInfoResp{} } func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoResp) ProtoMessage() {} func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{3} + return fileDescriptor_group_19947c3109871c24, []int{3} } func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b) @@ -194,9 +194,9 @@ func (m *GetGroupsInfoResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupsInfoResp proto.InternalMessageInfo -func (m *GetGroupsInfoResp) GetGroupInfoList() []*sdk_ws.GroupInfo { +func (m *GetGroupsInfoResp) GetGroupInfos() []*sdk_ws.GroupInfo { if m != nil { - return m.GroupInfoList + return m.GroupInfos } return nil } @@ -212,7 +212,7 @@ func (m *SetGroupInfoReq) Reset() { *m = SetGroupInfoReq{} } func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) } func (*SetGroupInfoReq) ProtoMessage() {} func (*SetGroupInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{4} + return fileDescriptor_group_19947c3109871c24, []int{4} } func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b) @@ -249,7 +249,7 @@ func (m *SetGroupInfoResp) Reset() { *m = SetGroupInfoResp{} } func (m *SetGroupInfoResp) String() string { return proto.CompactTextString(m) } func (*SetGroupInfoResp) ProtoMessage() {} func (*SetGroupInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{5} + return fileDescriptor_group_19947c3109871c24, []int{5} } func (m *SetGroupInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupInfoResp.Unmarshal(m, b) @@ -271,7 +271,7 @@ var xxx_messageInfo_SetGroupInfoResp proto.InternalMessageInfo type GetGroupApplicationListReq struct { Pagination *sdk_ws.RequestPagination `protobuf:"bytes,1,opt,name=pagination" json:"pagination,omitempty"` - FromUserID string `protobuf:"bytes,3,opt,name=fromUserID" json:"fromUserID,omitempty"` + FromUserID string `protobuf:"bytes,2,opt,name=fromUserID" json:"fromUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -281,7 +281,7 @@ func (m *GetGroupApplicationListReq) Reset() { *m = GetGroupApplicationL func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListReq) ProtoMessage() {} func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{6} + return fileDescriptor_group_19947c3109871c24, []int{6} } func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b) @@ -317,7 +317,7 @@ func (m *GetGroupApplicationListReq) GetFromUserID() string { type GetGroupApplicationListResp struct { Total int32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` - GroupRequestList []*sdk_ws.GroupRequest `protobuf:"bytes,3,rep,name=groupRequestList" json:"groupRequestList,omitempty"` + GroupRequests []*sdk_ws.GroupRequest `protobuf:"bytes,2,rep,name=groupRequests" json:"groupRequests,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -327,7 +327,7 @@ func (m *GetGroupApplicationListResp) Reset() { *m = GetGroupApplication func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListResp) ProtoMessage() {} func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{7} + return fileDescriptor_group_19947c3109871c24, []int{7} } func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b) @@ -354,9 +354,9 @@ func (m *GetGroupApplicationListResp) GetTotal() int32 { return 0 } -func (m *GetGroupApplicationListResp) GetGroupRequestList() []*sdk_ws.GroupRequest { +func (m *GetGroupApplicationListResp) GetGroupRequests() []*sdk_ws.GroupRequest { if m != nil { - return m.GroupRequestList + return m.GroupRequests } return nil } @@ -373,7 +373,7 @@ func (m *GetUserReqApplicationListReq) Reset() { *m = GetUserReqApplicat func (m *GetUserReqApplicationListReq) String() string { return proto.CompactTextString(m) } func (*GetUserReqApplicationListReq) ProtoMessage() {} func (*GetUserReqApplicationListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{8} + return fileDescriptor_group_19947c3109871c24, []int{8} } func (m *GetUserReqApplicationListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserReqApplicationListReq.Unmarshal(m, b) @@ -409,7 +409,7 @@ func (m *GetUserReqApplicationListReq) GetPagination() *sdk_ws.RequestPagination type GetUserReqApplicationListResp struct { Total int32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` - GroupRequestList []*sdk_ws.GroupRequest `protobuf:"bytes,2,rep,name=groupRequestList" json:"groupRequestList,omitempty"` + GroupRequests []*sdk_ws.GroupRequest `protobuf:"bytes,2,rep,name=groupRequests" json:"groupRequests,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -419,7 +419,7 @@ func (m *GetUserReqApplicationListResp) Reset() { *m = GetUserReqApplica func (m *GetUserReqApplicationListResp) String() string { return proto.CompactTextString(m) } func (*GetUserReqApplicationListResp) ProtoMessage() {} func (*GetUserReqApplicationListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{9} + return fileDescriptor_group_19947c3109871c24, []int{9} } func (m *GetUserReqApplicationListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserReqApplicationListResp.Unmarshal(m, b) @@ -446,9 +446,9 @@ func (m *GetUserReqApplicationListResp) GetTotal() int32 { return 0 } -func (m *GetUserReqApplicationListResp) GetGroupRequestList() []*sdk_ws.GroupRequest { +func (m *GetUserReqApplicationListResp) GetGroupRequests() []*sdk_ws.GroupRequest { if m != nil { - return m.GroupRequestList + return m.GroupRequests } return nil } @@ -466,7 +466,7 @@ func (m *TransferGroupOwnerReq) Reset() { *m = TransferGroupOwnerReq{} } func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) } func (*TransferGroupOwnerReq) ProtoMessage() {} func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{10} + return fileDescriptor_group_19947c3109871c24, []int{10} } func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b) @@ -517,7 +517,7 @@ func (m *TransferGroupOwnerResp) Reset() { *m = TransferGroupOwnerResp{} func (m *TransferGroupOwnerResp) String() string { return proto.CompactTextString(m) } func (*TransferGroupOwnerResp) ProtoMessage() {} func (*TransferGroupOwnerResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{11} + return fileDescriptor_group_19947c3109871c24, []int{11} } func (m *TransferGroupOwnerResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TransferGroupOwnerResp.Unmarshal(m, b) @@ -540,8 +540,8 @@ var xxx_messageInfo_TransferGroupOwnerResp proto.InternalMessageInfo type JoinGroupReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` ReqMessage string `protobuf:"bytes,2,opt,name=reqMessage" json:"reqMessage,omitempty"` - JoinSource int32 `protobuf:"varint,5,opt,name=joinSource" json:"joinSource,omitempty"` - InviterUserID string `protobuf:"bytes,6,opt,name=inviterUserID" json:"inviterUserID,omitempty"` + JoinSource int32 `protobuf:"varint,3,opt,name=joinSource" json:"joinSource,omitempty"` + InviterUserID string `protobuf:"bytes,4,opt,name=inviterUserID" json:"inviterUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -551,7 +551,7 @@ func (m *JoinGroupReq) Reset() { *m = JoinGroupReq{} } func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) } func (*JoinGroupReq) ProtoMessage() {} func (*JoinGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{12} + return fileDescriptor_group_19947c3109871c24, []int{12} } func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b) @@ -609,7 +609,7 @@ func (m *JoinGroupResp) Reset() { *m = JoinGroupResp{} } func (m *JoinGroupResp) String() string { return proto.CompactTextString(m) } func (*JoinGroupResp) ProtoMessage() {} func (*JoinGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{13} + return fileDescriptor_group_19947c3109871c24, []int{13} } func (m *JoinGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupResp.Unmarshal(m, b) @@ -630,10 +630,10 @@ func (m *JoinGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_JoinGroupResp proto.InternalMessageInfo type GroupApplicationResponseReq struct { - GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` - FromUserID string `protobuf:"bytes,4,opt,name=fromUserID" json:"fromUserID,omitempty"` - HandledMsg string `protobuf:"bytes,5,opt,name=handledMsg" json:"handledMsg,omitempty"` - HandleResult int32 `protobuf:"varint,6,opt,name=handleResult" json:"handleResult,omitempty"` + GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` + FromUserID string `protobuf:"bytes,2,opt,name=fromUserID" json:"fromUserID,omitempty"` + HandledMsg string `protobuf:"bytes,3,opt,name=handledMsg" json:"handledMsg,omitempty"` + HandleResult int32 `protobuf:"varint,4,opt,name=handleResult" json:"handleResult,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -643,7 +643,7 @@ func (m *GroupApplicationResponseReq) Reset() { *m = GroupApplicationRes func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) } func (*GroupApplicationResponseReq) ProtoMessage() {} func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{14} + return fileDescriptor_group_19947c3109871c24, []int{14} } func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b) @@ -701,7 +701,7 @@ func (m *GroupApplicationResponseResp) Reset() { *m = GroupApplicationRe func (m *GroupApplicationResponseResp) String() string { return proto.CompactTextString(m) } func (*GroupApplicationResponseResp) ProtoMessage() {} func (*GroupApplicationResponseResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{15} + return fileDescriptor_group_19947c3109871c24, []int{15} } func (m *GroupApplicationResponseResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationResponseResp.Unmarshal(m, b) @@ -732,7 +732,7 @@ func (m *QuitGroupReq) Reset() { *m = QuitGroupReq{} } func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) } func (*QuitGroupReq) ProtoMessage() {} func (*QuitGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{16} + return fileDescriptor_group_19947c3109871c24, []int{16} } func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b) @@ -769,7 +769,7 @@ func (m *QuitGroupResp) Reset() { *m = QuitGroupResp{} } func (m *QuitGroupResp) String() string { return proto.CompactTextString(m) } func (*QuitGroupResp) ProtoMessage() {} func (*QuitGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{17} + return fileDescriptor_group_19947c3109871c24, []int{17} } func (m *QuitGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuitGroupResp.Unmarshal(m, b) @@ -791,8 +791,8 @@ var xxx_messageInfo_QuitGroupResp proto.InternalMessageInfo type GetGroupMemberListReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - Filter int32 `protobuf:"varint,4,opt,name=filter" json:"filter,omitempty"` - Pagination *sdk_ws.RequestPagination `protobuf:"bytes,2,opt,name=pagination" json:"pagination,omitempty"` + Filter int32 `protobuf:"varint,2,opt,name=filter" json:"filter,omitempty"` + Pagination *sdk_ws.RequestPagination `protobuf:"bytes,4,opt,name=pagination" json:"pagination,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -802,7 +802,7 @@ func (m *GetGroupMemberListReq) Reset() { *m = GetGroupMemberListReq{} } func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListReq) ProtoMessage() {} func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{18} + return fileDescriptor_group_19947c3109871c24, []int{18} } func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b) @@ -845,7 +845,7 @@ func (m *GetGroupMemberListReq) GetPagination() *sdk_ws.RequestPagination { type GetGroupMemberListResp struct { Total int32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` - MemberList []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` + Members []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,2,rep,name=members" json:"members,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -855,7 +855,7 @@ func (m *GetGroupMemberListResp) Reset() { *m = GetGroupMemberListResp{} func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListResp) ProtoMessage() {} func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{19} + return fileDescriptor_group_19947c3109871c24, []int{19} } func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b) @@ -882,9 +882,9 @@ func (m *GetGroupMemberListResp) GetTotal() int32 { return 0 } -func (m *GetGroupMemberListResp) GetMemberList() []*sdk_ws.GroupMemberFullInfo { +func (m *GetGroupMemberListResp) GetMembers() []*sdk_ws.GroupMemberFullInfo { if m != nil { - return m.MemberList + return m.Members } return nil } @@ -901,7 +901,7 @@ func (m *GetGroupMembersInfoReq) Reset() { *m = GetGroupMembersInfoReq{} func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoReq) ProtoMessage() {} func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{20} + return fileDescriptor_group_19947c3109871c24, []int{20} } func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b) @@ -936,7 +936,7 @@ func (m *GetGroupMembersInfoReq) GetMemberList() []string { } type GetGroupMembersInfoResp struct { - MemberList []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` + Members []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members" json:"members,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -946,7 +946,7 @@ func (m *GetGroupMembersInfoResp) Reset() { *m = GetGroupMembersInfoResp func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoResp) ProtoMessage() {} func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{21} + return fileDescriptor_group_19947c3109871c24, []int{21} } func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b) @@ -966,9 +966,9 @@ func (m *GetGroupMembersInfoResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupMembersInfoResp proto.InternalMessageInfo -func (m *GetGroupMembersInfoResp) GetMemberList() []*sdk_ws.GroupMemberFullInfo { +func (m *GetGroupMembersInfoResp) GetMembers() []*sdk_ws.GroupMemberFullInfo { if m != nil { - return m.MemberList + return m.Members } return nil } @@ -986,7 +986,7 @@ func (m *KickGroupMemberReq) Reset() { *m = KickGroupMemberReq{} } func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberReq) ProtoMessage() {} func (*KickGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{22} + return fileDescriptor_group_19947c3109871c24, []int{22} } func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b) @@ -1037,7 +1037,7 @@ func (m *KickGroupMemberResp) Reset() { *m = KickGroupMemberResp{} } func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberResp) ProtoMessage() {} func (*KickGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{23} + return fileDescriptor_group_19947c3109871c24, []int{23} } func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b) @@ -1069,7 +1069,7 @@ func (m *GetJoinedGroupListReq) Reset() { *m = GetJoinedGroupListReq{} } func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListReq) ProtoMessage() {} func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{24} + return fileDescriptor_group_19947c3109871c24, []int{24} } func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b) @@ -1105,7 +1105,7 @@ func (m *GetJoinedGroupListReq) GetPagination() *sdk_ws.RequestPagination { type GetJoinedGroupListResp struct { Total int32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` - GroupList []*sdk_ws.GroupInfo `protobuf:"bytes,3,rep,name=groupList" json:"groupList,omitempty"` + Groups []*sdk_ws.GroupInfo `protobuf:"bytes,2,rep,name=groups" json:"groups,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1115,7 +1115,7 @@ func (m *GetJoinedGroupListResp) Reset() { *m = GetJoinedGroupListResp{} func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListResp) ProtoMessage() {} func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{25} + return fileDescriptor_group_19947c3109871c24, []int{25} } func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b) @@ -1142,17 +1142,17 @@ func (m *GetJoinedGroupListResp) GetTotal() int32 { return 0 } -func (m *GetJoinedGroupListResp) GetGroupList() []*sdk_ws.GroupInfo { +func (m *GetJoinedGroupListResp) GetGroups() []*sdk_ws.GroupInfo { if m != nil { - return m.GroupList + return m.Groups } return nil } type InviteUserToGroupReq struct { - GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` - Reason string `protobuf:"bytes,4,opt,name=reason" json:"reason,omitempty"` - InvitedUserIDList []string `protobuf:"bytes,5,rep,name=invitedUserIDList" json:"invitedUserIDList,omitempty"` + GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` + Reason string `protobuf:"bytes,2,opt,name=reason" json:"reason,omitempty"` + InvitedUserIDs []string `protobuf:"bytes,3,rep,name=invitedUserIDs" json:"invitedUserIDs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1162,7 +1162,7 @@ func (m *InviteUserToGroupReq) Reset() { *m = InviteUserToGroupReq{} } func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupReq) ProtoMessage() {} func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{26} + return fileDescriptor_group_19947c3109871c24, []int{26} } func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b) @@ -1196,9 +1196,9 @@ func (m *InviteUserToGroupReq) GetReason() string { return "" } -func (m *InviteUserToGroupReq) GetInvitedUserIDList() []string { +func (m *InviteUserToGroupReq) GetInvitedUserIDs() []string { if m != nil { - return m.InvitedUserIDList + return m.InvitedUserIDs } return nil } @@ -1213,7 +1213,7 @@ func (m *InviteUserToGroupResp) Reset() { *m = InviteUserToGroupResp{} } func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupResp) ProtoMessage() {} func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{27} + return fileDescriptor_group_19947c3109871c24, []int{27} } func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b) @@ -1234,19 +1234,18 @@ func (m *InviteUserToGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_InviteUserToGroupResp proto.InternalMessageInfo type GetGroupAllMemberReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - Offset int32 `protobuf:"varint,4,opt,name=offset" json:"offset,omitempty"` - Count int32 `protobuf:"varint,5,opt,name=count" json:"count,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` + Pagination *sdk_ws.RequestPagination `protobuf:"bytes,2,opt,name=pagination" json:"pagination,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetGroupAllMemberReq) Reset() { *m = GetGroupAllMemberReq{} } func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberReq) ProtoMessage() {} func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{28} + return fileDescriptor_group_19947c3109871c24, []int{28} } func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b) @@ -1273,22 +1272,15 @@ func (m *GetGroupAllMemberReq) GetGroupID() string { return "" } -func (m *GetGroupAllMemberReq) GetOffset() int32 { +func (m *GetGroupAllMemberReq) GetPagination() *sdk_ws.RequestPagination { if m != nil { - return m.Offset + return m.Pagination } - return 0 -} - -func (m *GetGroupAllMemberReq) GetCount() int32 { - if m != nil { - return m.Count - } - return 0 + return nil } type GetGroupAllMemberResp struct { - MemberList []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` + Members []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members" json:"members,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1298,7 +1290,7 @@ func (m *GetGroupAllMemberResp) Reset() { *m = GetGroupAllMemberResp{} } func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberResp) ProtoMessage() {} func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{29} + return fileDescriptor_group_19947c3109871c24, []int{29} } func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b) @@ -1318,9 +1310,9 @@ func (m *GetGroupAllMemberResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupAllMemberResp proto.InternalMessageInfo -func (m *GetGroupAllMemberResp) GetMemberList() []*sdk_ws.GroupMemberFullInfo { +func (m *GetGroupAllMemberResp) GetMembers() []*sdk_ws.GroupMemberFullInfo { if m != nil { - return m.MemberList + return m.Members } return nil } @@ -1338,7 +1330,7 @@ func (m *CMSGroup) Reset() { *m = CMSGroup{} } func (m *CMSGroup) String() string { return proto.CompactTextString(m) } func (*CMSGroup) ProtoMessage() {} func (*CMSGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{30} + return fileDescriptor_group_19947c3109871c24, []int{30} } func (m *CMSGroup) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CMSGroup.Unmarshal(m, b) @@ -1392,7 +1384,7 @@ func (m *GetGroupsReq) Reset() { *m = GetGroupsReq{} } func (m *GetGroupsReq) String() string { return proto.CompactTextString(m) } func (*GetGroupsReq) ProtoMessage() {} func (*GetGroupsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{31} + return fileDescriptor_group_19947c3109871c24, []int{31} } func (m *GetGroupsReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsReq.Unmarshal(m, b) @@ -1435,7 +1427,7 @@ func (m *GetGroupsReq) GetGroupID() string { type GetGroupsResp struct { Groups []*CMSGroup `protobuf:"bytes,1,rep,name=groups" json:"groups,omitempty"` - GroupNum int32 `protobuf:"varint,3,opt,name=GroupNum" json:"GroupNum,omitempty"` + GroupNum int32 `protobuf:"varint,2,opt,name=GroupNum" json:"GroupNum,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1445,7 +1437,7 @@ func (m *GetGroupsResp) Reset() { *m = GetGroupsResp{} } func (m *GetGroupsResp) String() string { return proto.CompactTextString(m) } func (*GetGroupsResp) ProtoMessage() {} func (*GetGroupsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{32} + return fileDescriptor_group_19947c3109871c24, []int{32} } func (m *GetGroupsResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsResp.Unmarshal(m, b) @@ -1490,7 +1482,7 @@ func (m *GetGroupMemberReq) Reset() { *m = GetGroupMemberReq{} } func (m *GetGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberReq) ProtoMessage() {} func (*GetGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{33} + return fileDescriptor_group_19947c3109871c24, []int{33} } func (m *GetGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberReq.Unmarshal(m, b) @@ -1530,7 +1522,7 @@ func (m *GetGroupMembersCMSReq) Reset() { *m = GetGroupMembersCMSReq{} } func (m *GetGroupMembersCMSReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersCMSReq) ProtoMessage() {} func (*GetGroupMembersCMSReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{34} + return fileDescriptor_group_19947c3109871c24, []int{34} } func (m *GetGroupMembersCMSReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersCMSReq.Unmarshal(m, b) @@ -1584,7 +1576,7 @@ func (m *GetGroupMembersCMSResp) Reset() { *m = GetGroupMembersCMSResp{} func (m *GetGroupMembersCMSResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersCMSResp) ProtoMessage() {} func (*GetGroupMembersCMSResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{35} + return fileDescriptor_group_19947c3109871c24, []int{35} } func (m *GetGroupMembersCMSResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersCMSResp.Unmarshal(m, b) @@ -1626,7 +1618,7 @@ func (m *GetGroupMembersCMSResp) GetMemberNums() int32 { } type DismissGroupReq struct { - GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` + GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1636,7 +1628,7 @@ func (m *DismissGroupReq) Reset() { *m = DismissGroupReq{} } func (m *DismissGroupReq) String() string { return proto.CompactTextString(m) } func (*DismissGroupReq) ProtoMessage() {} func (*DismissGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{36} + return fileDescriptor_group_19947c3109871c24, []int{36} } func (m *DismissGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DismissGroupReq.Unmarshal(m, b) @@ -1673,7 +1665,7 @@ func (m *DismissGroupResp) Reset() { *m = DismissGroupResp{} } func (m *DismissGroupResp) String() string { return proto.CompactTextString(m) } func (*DismissGroupResp) ProtoMessage() {} func (*DismissGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{37} + return fileDescriptor_group_19947c3109871c24, []int{37} } func (m *DismissGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DismissGroupResp.Unmarshal(m, b) @@ -1694,9 +1686,9 @@ func (m *DismissGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_DismissGroupResp proto.InternalMessageInfo type MuteGroupMemberReq struct { - GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` - UserID string `protobuf:"bytes,4,opt,name=userID" json:"userID,omitempty"` - MutedSeconds uint32 `protobuf:"varint,5,opt,name=mutedSeconds" json:"mutedSeconds,omitempty"` + GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` + MutedSeconds uint32 `protobuf:"varint,3,opt,name=mutedSeconds" json:"mutedSeconds,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1706,7 +1698,7 @@ func (m *MuteGroupMemberReq) Reset() { *m = MuteGroupMemberReq{} } func (m *MuteGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*MuteGroupMemberReq) ProtoMessage() {} func (*MuteGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{38} + return fileDescriptor_group_19947c3109871c24, []int{38} } func (m *MuteGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MuteGroupMemberReq.Unmarshal(m, b) @@ -1757,7 +1749,7 @@ func (m *MuteGroupMemberResp) Reset() { *m = MuteGroupMemberResp{} } func (m *MuteGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*MuteGroupMemberResp) ProtoMessage() {} func (*MuteGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{39} + return fileDescriptor_group_19947c3109871c24, []int{39} } func (m *MuteGroupMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MuteGroupMemberResp.Unmarshal(m, b) @@ -1778,8 +1770,8 @@ func (m *MuteGroupMemberResp) XXX_DiscardUnknown() { var xxx_messageInfo_MuteGroupMemberResp proto.InternalMessageInfo type CancelMuteGroupMemberReq struct { - GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` - UserID string `protobuf:"bytes,4,opt,name=userID" json:"userID,omitempty"` + GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1789,7 +1781,7 @@ func (m *CancelMuteGroupMemberReq) Reset() { *m = CancelMuteGroupMemberR func (m *CancelMuteGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*CancelMuteGroupMemberReq) ProtoMessage() {} func (*CancelMuteGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{40} + return fileDescriptor_group_19947c3109871c24, []int{40} } func (m *CancelMuteGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CancelMuteGroupMemberReq.Unmarshal(m, b) @@ -1833,7 +1825,7 @@ func (m *CancelMuteGroupMemberResp) Reset() { *m = CancelMuteGroupMember func (m *CancelMuteGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*CancelMuteGroupMemberResp) ProtoMessage() {} func (*CancelMuteGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{41} + return fileDescriptor_group_19947c3109871c24, []int{41} } func (m *CancelMuteGroupMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CancelMuteGroupMemberResp.Unmarshal(m, b) @@ -1854,7 +1846,7 @@ func (m *CancelMuteGroupMemberResp) XXX_DiscardUnknown() { var xxx_messageInfo_CancelMuteGroupMemberResp proto.InternalMessageInfo type MuteGroupReq struct { - GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` + GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1864,7 +1856,7 @@ func (m *MuteGroupReq) Reset() { *m = MuteGroupReq{} } func (m *MuteGroupReq) String() string { return proto.CompactTextString(m) } func (*MuteGroupReq) ProtoMessage() {} func (*MuteGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{42} + return fileDescriptor_group_19947c3109871c24, []int{42} } func (m *MuteGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MuteGroupReq.Unmarshal(m, b) @@ -1901,7 +1893,7 @@ func (m *MuteGroupResp) Reset() { *m = MuteGroupResp{} } func (m *MuteGroupResp) String() string { return proto.CompactTextString(m) } func (*MuteGroupResp) ProtoMessage() {} func (*MuteGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{43} + return fileDescriptor_group_19947c3109871c24, []int{43} } func (m *MuteGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MuteGroupResp.Unmarshal(m, b) @@ -1922,7 +1914,7 @@ func (m *MuteGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_MuteGroupResp proto.InternalMessageInfo type CancelMuteGroupReq struct { - GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` + GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1932,7 +1924,7 @@ func (m *CancelMuteGroupReq) Reset() { *m = CancelMuteGroupReq{} } func (m *CancelMuteGroupReq) String() string { return proto.CompactTextString(m) } func (*CancelMuteGroupReq) ProtoMessage() {} func (*CancelMuteGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{44} + return fileDescriptor_group_19947c3109871c24, []int{44} } func (m *CancelMuteGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CancelMuteGroupReq.Unmarshal(m, b) @@ -1969,7 +1961,7 @@ func (m *CancelMuteGroupResp) Reset() { *m = CancelMuteGroupResp{} } func (m *CancelMuteGroupResp) String() string { return proto.CompactTextString(m) } func (*CancelMuteGroupResp) ProtoMessage() {} func (*CancelMuteGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{45} + return fileDescriptor_group_19947c3109871c24, []int{45} } func (m *CancelMuteGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CancelMuteGroupResp.Unmarshal(m, b) @@ -1992,7 +1984,7 @@ var xxx_messageInfo_CancelMuteGroupResp proto.InternalMessageInfo type SetGroupMemberNicknameReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` Nickname string `protobuf:"bytes,2,opt,name=nickname" json:"nickname,omitempty"` - UserID string `protobuf:"bytes,5,opt,name=userID" json:"userID,omitempty"` + UserID string `protobuf:"bytes,3,opt,name=userID" json:"userID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2002,7 +1994,7 @@ func (m *SetGroupMemberNicknameReq) Reset() { *m = SetGroupMemberNicknam func (m *SetGroupMemberNicknameReq) String() string { return proto.CompactTextString(m) } func (*SetGroupMemberNicknameReq) ProtoMessage() {} func (*SetGroupMemberNicknameReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{46} + return fileDescriptor_group_19947c3109871c24, []int{46} } func (m *SetGroupMemberNicknameReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupMemberNicknameReq.Unmarshal(m, b) @@ -2053,7 +2045,7 @@ func (m *SetGroupMemberNicknameResp) Reset() { *m = SetGroupMemberNickna func (m *SetGroupMemberNicknameResp) String() string { return proto.CompactTextString(m) } func (*SetGroupMemberNicknameResp) ProtoMessage() {} func (*SetGroupMemberNicknameResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{47} + return fileDescriptor_group_19947c3109871c24, []int{47} } func (m *SetGroupMemberNicknameResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupMemberNicknameResp.Unmarshal(m, b) @@ -2085,7 +2077,7 @@ func (m *GetJoinedSuperGroupListReq) Reset() { *m = GetJoinedSuperGroupL func (m *GetJoinedSuperGroupListReq) String() string { return proto.CompactTextString(m) } func (*GetJoinedSuperGroupListReq) ProtoMessage() {} func (*GetJoinedSuperGroupListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{48} + return fileDescriptor_group_19947c3109871c24, []int{48} } func (m *GetJoinedSuperGroupListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedSuperGroupListReq.Unmarshal(m, b) @@ -2121,7 +2113,7 @@ func (m *GetJoinedSuperGroupListReq) GetUserID() string { type GetJoinedSuperGroupListResp struct { Total int32 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"` - GroupList []*sdk_ws.GroupInfo `protobuf:"bytes,3,rep,name=groupList" json:"groupList,omitempty"` + Groups []*sdk_ws.GroupInfo `protobuf:"bytes,2,rep,name=groups" json:"groups,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2131,7 +2123,7 @@ func (m *GetJoinedSuperGroupListResp) Reset() { *m = GetJoinedSuperGroup func (m *GetJoinedSuperGroupListResp) String() string { return proto.CompactTextString(m) } func (*GetJoinedSuperGroupListResp) ProtoMessage() {} func (*GetJoinedSuperGroupListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{49} + return fileDescriptor_group_19947c3109871c24, []int{49} } func (m *GetJoinedSuperGroupListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedSuperGroupListResp.Unmarshal(m, b) @@ -2158,15 +2150,15 @@ func (m *GetJoinedSuperGroupListResp) GetTotal() int32 { return 0 } -func (m *GetJoinedSuperGroupListResp) GetGroupList() []*sdk_ws.GroupInfo { +func (m *GetJoinedSuperGroupListResp) GetGroups() []*sdk_ws.GroupInfo { if m != nil { - return m.GroupList + return m.Groups } return nil } type GetSuperGroupsInfoReq struct { - GroupIDList []string `protobuf:"bytes,1,rep,name=groupIDList" json:"groupIDList,omitempty"` + GroupIDs []string `protobuf:"bytes,1,rep,name=groupIDs" json:"groupIDs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2176,7 +2168,7 @@ func (m *GetSuperGroupsInfoReq) Reset() { *m = GetSuperGroupsInfoReq{} } func (m *GetSuperGroupsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetSuperGroupsInfoReq) ProtoMessage() {} func (*GetSuperGroupsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{50} + return fileDescriptor_group_19947c3109871c24, []int{50} } func (m *GetSuperGroupsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSuperGroupsInfoReq.Unmarshal(m, b) @@ -2196,15 +2188,15 @@ func (m *GetSuperGroupsInfoReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetSuperGroupsInfoReq proto.InternalMessageInfo -func (m *GetSuperGroupsInfoReq) GetGroupIDList() []string { +func (m *GetSuperGroupsInfoReq) GetGroupIDs() []string { if m != nil { - return m.GroupIDList + return m.GroupIDs } return nil } type GetSuperGroupsInfoResp struct { - GroupInfoList []*sdk_ws.GroupInfo `protobuf:"bytes,3,rep,name=groupInfoList" json:"groupInfoList,omitempty"` + GroupInfos []*sdk_ws.GroupInfo `protobuf:"bytes,1,rep,name=groupInfos" json:"groupInfos,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2214,7 +2206,7 @@ func (m *GetSuperGroupsInfoResp) Reset() { *m = GetSuperGroupsInfoResp{} func (m *GetSuperGroupsInfoResp) String() string { return proto.CompactTextString(m) } func (*GetSuperGroupsInfoResp) ProtoMessage() {} func (*GetSuperGroupsInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{51} + return fileDescriptor_group_19947c3109871c24, []int{51} } func (m *GetSuperGroupsInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSuperGroupsInfoResp.Unmarshal(m, b) @@ -2234,9 +2226,9 @@ func (m *GetSuperGroupsInfoResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetSuperGroupsInfoResp proto.InternalMessageInfo -func (m *GetSuperGroupsInfoResp) GetGroupInfoList() []*sdk_ws.GroupInfo { +func (m *GetSuperGroupsInfoResp) GetGroupInfos() []*sdk_ws.GroupInfo { if m != nil { - return m.GroupInfoList + return m.GroupInfos } return nil } @@ -2244,10 +2236,10 @@ func (m *GetSuperGroupsInfoResp) GetGroupInfoList() []*sdk_ws.GroupInfo { type SetGroupMemberInfoReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` - Nickname *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=nickname" json:"nickname,omitempty"` - FaceURL *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=faceURL" json:"faceURL,omitempty"` - RoleLevel *wrapperspb.Int32Value `protobuf:"bytes,7,opt,name=roleLevel" json:"roleLevel,omitempty"` - Ex *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=ex" json:"ex,omitempty"` + Nickname *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=nickname" json:"nickname,omitempty"` + FaceURL *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=faceURL" json:"faceURL,omitempty"` + RoleLevel *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=roleLevel" json:"roleLevel,omitempty"` + Ex *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=ex" json:"ex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2257,7 +2249,7 @@ func (m *SetGroupMemberInfoReq) Reset() { *m = SetGroupMemberInfoReq{} } func (m *SetGroupMemberInfoReq) String() string { return proto.CompactTextString(m) } func (*SetGroupMemberInfoReq) ProtoMessage() {} func (*SetGroupMemberInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{52} + return fileDescriptor_group_19947c3109871c24, []int{52} } func (m *SetGroupMemberInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupMemberInfoReq.Unmarshal(m, b) @@ -2329,7 +2321,7 @@ func (m *SetGroupMemberInfoResp) Reset() { *m = SetGroupMemberInfoResp{} func (m *SetGroupMemberInfoResp) String() string { return proto.CompactTextString(m) } func (*SetGroupMemberInfoResp) ProtoMessage() {} func (*SetGroupMemberInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{53} + return fileDescriptor_group_19947c3109871c24, []int{53} } func (m *SetGroupMemberInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupMemberInfoResp.Unmarshal(m, b) @@ -2360,7 +2352,7 @@ func (m *GetGroupAbstractInfoReq) Reset() { *m = GetGroupAbstractInfoReq func (m *GetGroupAbstractInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupAbstractInfoReq) ProtoMessage() {} func (*GetGroupAbstractInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{54} + return fileDescriptor_group_19947c3109871c24, []int{54} } func (m *GetGroupAbstractInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAbstractInfoReq.Unmarshal(m, b) @@ -2400,7 +2392,7 @@ func (m *GroupAbstractInfo) Reset() { *m = GroupAbstractInfo{} } func (m *GroupAbstractInfo) String() string { return proto.CompactTextString(m) } func (*GroupAbstractInfo) ProtoMessage() {} func (*GroupAbstractInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{55} + return fileDescriptor_group_19947c3109871c24, []int{55} } func (m *GroupAbstractInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupAbstractInfo.Unmarshal(m, b) @@ -2452,7 +2444,7 @@ func (m *GetGroupAbstractInfoResp) Reset() { *m = GetGroupAbstractInfoRe func (m *GetGroupAbstractInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupAbstractInfoResp) ProtoMessage() {} func (*GetGroupAbstractInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_0c9461c2b49843c3, []int{56} + return fileDescriptor_group_19947c3109871c24, []int{56} } func (m *GetGroupAbstractInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAbstractInfoResp.Unmarshal(m, b) @@ -2479,6 +2471,90 @@ func (m *GetGroupAbstractInfoResp) GetGroupAbstractInfos() []*GroupAbstractInfo return nil } +type GetUserInGroupMembersReq struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + GroupIDs []string `protobuf:"bytes,2,rep,name=groupIDs" json:"groupIDs,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetUserInGroupMembersReq) Reset() { *m = GetUserInGroupMembersReq{} } +func (m *GetUserInGroupMembersReq) String() string { return proto.CompactTextString(m) } +func (*GetUserInGroupMembersReq) ProtoMessage() {} +func (*GetUserInGroupMembersReq) Descriptor() ([]byte, []int) { + return fileDescriptor_group_19947c3109871c24, []int{57} +} +func (m *GetUserInGroupMembersReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetUserInGroupMembersReq.Unmarshal(m, b) +} +func (m *GetUserInGroupMembersReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetUserInGroupMembersReq.Marshal(b, m, deterministic) +} +func (dst *GetUserInGroupMembersReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetUserInGroupMembersReq.Merge(dst, src) +} +func (m *GetUserInGroupMembersReq) XXX_Size() int { + return xxx_messageInfo_GetUserInGroupMembersReq.Size(m) +} +func (m *GetUserInGroupMembersReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetUserInGroupMembersReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetUserInGroupMembersReq proto.InternalMessageInfo + +func (m *GetUserInGroupMembersReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *GetUserInGroupMembersReq) GetGroupIDs() []string { + if m != nil { + return m.GroupIDs + } + return nil +} + +type GetUserInGroupMembersResp struct { + Members []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members" json:"members,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetUserInGroupMembersResp) Reset() { *m = GetUserInGroupMembersResp{} } +func (m *GetUserInGroupMembersResp) String() string { return proto.CompactTextString(m) } +func (*GetUserInGroupMembersResp) ProtoMessage() {} +func (*GetUserInGroupMembersResp) Descriptor() ([]byte, []int) { + return fileDescriptor_group_19947c3109871c24, []int{58} +} +func (m *GetUserInGroupMembersResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetUserInGroupMembersResp.Unmarshal(m, b) +} +func (m *GetUserInGroupMembersResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetUserInGroupMembersResp.Marshal(b, m, deterministic) +} +func (dst *GetUserInGroupMembersResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetUserInGroupMembersResp.Merge(dst, src) +} +func (m *GetUserInGroupMembersResp) XXX_Size() int { + return xxx_messageInfo_GetUserInGroupMembersResp.Size(m) +} +func (m *GetUserInGroupMembersResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetUserInGroupMembersResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetUserInGroupMembersResp proto.InternalMessageInfo + +func (m *GetUserInGroupMembersResp) GetMembers() []*sdk_ws.GroupMemberFullInfo { + if m != nil { + return m.Members + } + return nil +} + func init() { proto.RegisterType((*CreateGroupReq)(nil), "group.CreateGroupReq") proto.RegisterType((*CreateGroupResp)(nil), "group.CreateGroupResp") @@ -2537,6 +2613,8 @@ func init() { proto.RegisterType((*GetGroupAbstractInfoReq)(nil), "group.GetGroupAbstractInfoReq") proto.RegisterType((*GroupAbstractInfo)(nil), "group.GroupAbstractInfo") proto.RegisterType((*GetGroupAbstractInfoResp)(nil), "group.GetGroupAbstractInfoResp") + proto.RegisterType((*GetUserInGroupMembersReq)(nil), "group.getUserInGroupMembersReq") + proto.RegisterType((*GetUserInGroupMembersResp)(nil), "group.getUserInGroupMembersResp") } // Reference imports to suppress errors if they are not otherwise used. @@ -2600,6 +2678,8 @@ type GroupClient interface { SetGroupMemberInfo(ctx context.Context, in *SetGroupMemberInfoReq, opts ...grpc.CallOption) (*SetGroupMemberInfoResp, error) // 获取群信息hash值 GetGroupAbstractInfo(ctx context.Context, in *GetGroupAbstractInfoReq, opts ...grpc.CallOption) (*GetGroupAbstractInfoResp, error) + // 获取某个用户在指定群中的信息 + GetUserInGroupMembers(ctx context.Context, in *GetUserInGroupMembersReq, opts ...grpc.CallOption) (*GetUserInGroupMembersResp, error) } type groupClient struct { @@ -2738,7 +2818,7 @@ func (c *groupClient) InviteUserToGroup(ctx context.Context, in *InviteUserToGro func (c *groupClient) GetGroups(ctx context.Context, in *GetGroupsReq, opts ...grpc.CallOption) (*GetGroupsResp, error) { out := new(GetGroupsResp) - err := grpc.Invoke(ctx, "/group.group/GetGroups", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/group.group/getGroups", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -2747,7 +2827,7 @@ func (c *groupClient) GetGroups(ctx context.Context, in *GetGroupsReq, opts ...g func (c *groupClient) GetGroupMembersCMS(ctx context.Context, in *GetGroupMembersCMSReq, opts ...grpc.CallOption) (*GetGroupMembersCMSResp, error) { out := new(GetGroupMembersCMSResp) - err := grpc.Invoke(ctx, "/group.group/GetGroupMembersCMS", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/group.group/getGroupMembersCMS", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -2756,7 +2836,7 @@ func (c *groupClient) GetGroupMembersCMS(ctx context.Context, in *GetGroupMember func (c *groupClient) DismissGroup(ctx context.Context, in *DismissGroupReq, opts ...grpc.CallOption) (*DismissGroupResp, error) { out := new(DismissGroupResp) - err := grpc.Invoke(ctx, "/group.group/DismissGroup", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/group.group/dismissGroup", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -2765,7 +2845,7 @@ func (c *groupClient) DismissGroup(ctx context.Context, in *DismissGroupReq, opt func (c *groupClient) MuteGroupMember(ctx context.Context, in *MuteGroupMemberReq, opts ...grpc.CallOption) (*MuteGroupMemberResp, error) { out := new(MuteGroupMemberResp) - err := grpc.Invoke(ctx, "/group.group/MuteGroupMember", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/group.group/muteGroupMember", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -2774,7 +2854,7 @@ func (c *groupClient) MuteGroupMember(ctx context.Context, in *MuteGroupMemberRe func (c *groupClient) CancelMuteGroupMember(ctx context.Context, in *CancelMuteGroupMemberReq, opts ...grpc.CallOption) (*CancelMuteGroupMemberResp, error) { out := new(CancelMuteGroupMemberResp) - err := grpc.Invoke(ctx, "/group.group/CancelMuteGroupMember", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/group.group/cancelMuteGroupMember", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -2783,7 +2863,7 @@ func (c *groupClient) CancelMuteGroupMember(ctx context.Context, in *CancelMuteG func (c *groupClient) MuteGroup(ctx context.Context, in *MuteGroupReq, opts ...grpc.CallOption) (*MuteGroupResp, error) { out := new(MuteGroupResp) - err := grpc.Invoke(ctx, "/group.group/MuteGroup", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/group.group/muteGroup", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -2792,7 +2872,7 @@ func (c *groupClient) MuteGroup(ctx context.Context, in *MuteGroupReq, opts ...g func (c *groupClient) CancelMuteGroup(ctx context.Context, in *CancelMuteGroupReq, opts ...grpc.CallOption) (*CancelMuteGroupResp, error) { out := new(CancelMuteGroupResp) - err := grpc.Invoke(ctx, "/group.group/CancelMuteGroup", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/group.group/cancelMuteGroup", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -2801,7 +2881,7 @@ func (c *groupClient) CancelMuteGroup(ctx context.Context, in *CancelMuteGroupRe func (c *groupClient) GetJoinedSuperGroupList(ctx context.Context, in *GetJoinedSuperGroupListReq, opts ...grpc.CallOption) (*GetJoinedSuperGroupListResp, error) { out := new(GetJoinedSuperGroupListResp) - err := grpc.Invoke(ctx, "/group.group/GetJoinedSuperGroupList", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/group.group/getJoinedSuperGroupList", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -2810,7 +2890,7 @@ func (c *groupClient) GetJoinedSuperGroupList(ctx context.Context, in *GetJoined func (c *groupClient) GetSuperGroupsInfo(ctx context.Context, in *GetSuperGroupsInfoReq, opts ...grpc.CallOption) (*GetSuperGroupsInfoResp, error) { out := new(GetSuperGroupsInfoResp) - err := grpc.Invoke(ctx, "/group.group/GetSuperGroupsInfo", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/group.group/getSuperGroupsInfo", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -2819,7 +2899,7 @@ func (c *groupClient) GetSuperGroupsInfo(ctx context.Context, in *GetSuperGroups func (c *groupClient) SetGroupMemberNickname(ctx context.Context, in *SetGroupMemberNicknameReq, opts ...grpc.CallOption) (*SetGroupMemberNicknameResp, error) { out := new(SetGroupMemberNicknameResp) - err := grpc.Invoke(ctx, "/group.group/SetGroupMemberNickname", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/group.group/setGroupMemberNickname", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -2828,7 +2908,7 @@ func (c *groupClient) SetGroupMemberNickname(ctx context.Context, in *SetGroupMe func (c *groupClient) SetGroupMemberInfo(ctx context.Context, in *SetGroupMemberInfoReq, opts ...grpc.CallOption) (*SetGroupMemberInfoResp, error) { out := new(SetGroupMemberInfoResp) - err := grpc.Invoke(ctx, "/group.group/SetGroupMemberInfo", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/group.group/setGroupMemberInfo", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -2837,7 +2917,16 @@ func (c *groupClient) SetGroupMemberInfo(ctx context.Context, in *SetGroupMember func (c *groupClient) GetGroupAbstractInfo(ctx context.Context, in *GetGroupAbstractInfoReq, opts ...grpc.CallOption) (*GetGroupAbstractInfoResp, error) { out := new(GetGroupAbstractInfoResp) - err := grpc.Invoke(ctx, "/group.group/GetGroupAbstractInfo", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/group.group/getGroupAbstractInfo", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupClient) GetUserInGroupMembers(ctx context.Context, in *GetUserInGroupMembersReq, opts ...grpc.CallOption) (*GetUserInGroupMembersResp, error) { + out := new(GetUserInGroupMembersResp) + err := grpc.Invoke(ctx, "/group.group/getUserInGroupMembers", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -2897,6 +2986,8 @@ type GroupServer interface { SetGroupMemberInfo(context.Context, *SetGroupMemberInfoReq) (*SetGroupMemberInfoResp, error) // 获取群信息hash值 GetGroupAbstractInfo(context.Context, *GetGroupAbstractInfoReq) (*GetGroupAbstractInfoResp, error) + // 获取某个用户在指定群中的信息 + GetUserInGroupMembers(context.Context, *GetUserInGroupMembersReq) (*GetUserInGroupMembersResp, error) } func RegisterGroupServer(s *grpc.Server, srv GroupServer) { @@ -3371,6 +3462,24 @@ func _Group_GetGroupAbstractInfo_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _Group_GetUserInGroupMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserInGroupMembersReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GroupServer).GetUserInGroupMembers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/group.group/GetUserInGroupMembers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GroupServer).GetUserInGroupMembers(ctx, req.(*GetUserInGroupMembersReq)) + } + return interceptor(ctx, in, info, handler) +} + var _Group_serviceDesc = grpc.ServiceDesc{ ServiceName: "group.group", HandlerType: (*GroupServer)(nil), @@ -3432,177 +3541,180 @@ var _Group_serviceDesc = grpc.ServiceDesc{ Handler: _Group_InviteUserToGroup_Handler, }, { - MethodName: "GetGroups", + MethodName: "getGroups", Handler: _Group_GetGroups_Handler, }, { - MethodName: "GetGroupMembersCMS", + MethodName: "getGroupMembersCMS", Handler: _Group_GetGroupMembersCMS_Handler, }, { - MethodName: "DismissGroup", + MethodName: "dismissGroup", Handler: _Group_DismissGroup_Handler, }, { - MethodName: "MuteGroupMember", + MethodName: "muteGroupMember", Handler: _Group_MuteGroupMember_Handler, }, { - MethodName: "CancelMuteGroupMember", + MethodName: "cancelMuteGroupMember", Handler: _Group_CancelMuteGroupMember_Handler, }, { - MethodName: "MuteGroup", + MethodName: "muteGroup", Handler: _Group_MuteGroup_Handler, }, { - MethodName: "CancelMuteGroup", + MethodName: "cancelMuteGroup", Handler: _Group_CancelMuteGroup_Handler, }, { - MethodName: "GetJoinedSuperGroupList", + MethodName: "getJoinedSuperGroupList", Handler: _Group_GetJoinedSuperGroupList_Handler, }, { - MethodName: "GetSuperGroupsInfo", + MethodName: "getSuperGroupsInfo", Handler: _Group_GetSuperGroupsInfo_Handler, }, { - MethodName: "SetGroupMemberNickname", + MethodName: "setGroupMemberNickname", Handler: _Group_SetGroupMemberNickname_Handler, }, { - MethodName: "SetGroupMemberInfo", + MethodName: "setGroupMemberInfo", Handler: _Group_SetGroupMemberInfo_Handler, }, { - MethodName: "GetGroupAbstractInfo", + MethodName: "getGroupAbstractInfo", Handler: _Group_GetGroupAbstractInfo_Handler, }, + { + MethodName: "getUserInGroupMembers", + Handler: _Group_GetUserInGroupMembers_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "group/group.proto", } -func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_0c9461c2b49843c3) } +func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_19947c3109871c24) } -var fileDescriptor_group_0c9461c2b49843c3 = []byte{ - // 1871 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x5f, 0x6f, 0x1b, 0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0x39, 0xce, 0xe8, 0xa7, 0xf7, 0xbf, 0xba, 0xfb, 0x82, - 0x92, 0xe8, 0xf8, 0xa0, 0xa7, 0xfd, 0xa3, 0x28, 0x6c, 0x7e, 0x2c, 0x7e, 0x4f, 0x96, 0x85, 0xe8, - 0x83, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x22, 0x4e, 0x92, 0x9d, 0xc4, 0x1c, 0x00, 0x00, +var fileDescriptor_group_19947c3109871c24 = []byte{ + // 1848 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x5f, 0x53, 0xdb, 0xc0, + 0x11, 0x1f, 0x99, 0x40, 0xc2, 0x06, 0x02, 0x1c, 0x18, 0x8c, 0x20, 0x40, 0x2e, 0x69, 0xca, 0xb4, + 0x89, 0xe9, 0x24, 0x6d, 0xa6, 0x7f, 0x32, 0x93, 0x26, 0x90, 0x10, 0x5a, 0x0c, 0x8d, 0x4c, 0xd2, + 0x69, 0x3a, 0x19, 0x2a, 0xec, 0x43, 0x51, 0xb0, 0xa5, 0x43, 0x27, 0x43, 0x26, 0x93, 0x3e, 0xb4, + 0xcf, 0xfd, 0xf3, 0xd0, 0xc7, 0xbe, 0x75, 0xfa, 0x29, 0xfa, 0xd6, 0xaf, 0xd2, 0x4f, 0xd2, 0xd1, + 0xe9, 0x74, 0x3e, 0x49, 0x27, 0xd9, 0x25, 0xee, 0x8b, 0x67, 0xb4, 0xb7, 0x7b, 0xb7, 0xb7, 0xff, + 0xee, 0xb7, 0x6b, 0x98, 0x73, 0x02, 0xbf, 0x47, 0xb7, 0xf8, 0x6f, 0x9d, 0x06, 0x7e, 0xe8, 0xa3, + 0x71, 0xfe, 0x61, 0x6e, 0x1e, 0x52, 0xe2, 0x3d, 0xdc, 0x6b, 0x3c, 0x6c, 0x92, 0xe0, 0x82, 0x04, + 0x5b, 0xf4, 0xcc, 0xd9, 0xe2, 0x0c, 0x5b, 0xac, 0x7d, 0x76, 0x7c, 0xc9, 0xb6, 0x2e, 0x59, 0x2c, + 0x60, 0xd6, 0x07, 0x72, 0x06, 0x36, 0xa5, 0x24, 0x10, 0xfc, 0xf8, 0x5f, 0x06, 0xdc, 0xda, 0x0e, + 0x88, 0x1d, 0x92, 0xdd, 0xe8, 0x24, 0x8b, 0x9c, 0xa3, 0xfb, 0x70, 0xcb, 0xf5, 0xdc, 0xb0, 0x41, + 0xba, 0x27, 0x24, 0xd8, 0x77, 0x59, 0x58, 0x33, 0x36, 0xc6, 0x36, 0x27, 0xad, 0x0c, 0x15, 0xfd, + 0x14, 0x26, 0xb9, 0x76, 0x7b, 0xde, 0xa9, 0x5f, 0xab, 0x6c, 0x18, 0x9b, 0x37, 0x1f, 0xad, 0xd6, + 0x19, 0x3f, 0xf6, 0xd8, 0xa6, 0xee, 0x31, 0xb5, 0x03, 0xbb, 0xcb, 0xea, 0xbb, 0x09, 0x8f, 0xd5, + 0x67, 0x47, 0x18, 0xa6, 0xec, 0x76, 0xd7, 0xf5, 0xde, 0x32, 0x12, 0xec, 0xed, 0xb0, 0xda, 0x18, + 0x3f, 0x21, 0x45, 0x43, 0x1b, 0x70, 0xd3, 0xbf, 0xf4, 0x48, 0x10, 0x7f, 0xd7, 0xae, 0x6d, 0x18, + 0x9b, 0x93, 0x96, 0x4a, 0xc2, 0x0d, 0x98, 0x49, 0xe9, 0xce, 0x68, 0x5a, 0x29, 0xe3, 0x7f, 0x52, + 0x0a, 0xd7, 0x61, 0x76, 0x97, 0x84, 0x7c, 0x89, 0xf1, 0x35, 0x72, 0x8e, 0x4c, 0xb8, 0x11, 0x33, + 0xec, 0x30, 0x61, 0x06, 0xf9, 0x8d, 0xdf, 0xc0, 0x5c, 0x86, 0x9f, 0x51, 0xf4, 0x14, 0x40, 0xee, + 0x18, 0x8b, 0x0c, 0xd2, 0x40, 0xe1, 0xc7, 0xc7, 0x30, 0xd3, 0x14, 0x5b, 0x26, 0x1a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 0xa4, 0xc6, 0x5a, 0x4c, + 0x2a, 0x35, 0xd6, 0x63, 0x31, 0xf4, 0x6b, 0x58, 0x70, 0x34, 0x20, 0x06, 0x65, 0xeb, 0x4f, 0x06, + 0xa8, 0x99, 0xeb, 0xa5, 0xeb, 0x71, 0x74, 0x6a, 0x71, 0x86, 0x8c, 0xce, 0x22, 0x54, 0x23, 0xa3, + 0xb3, 0x10, 0xa6, 0xbc, 0x58, 0x7f, 0x7f, 0xfb, 0x90, 0x12, 0xef, 0x78, 0xaf, 0xa1, 0xfc, 0x55, + 0xca, 0x85, 0x7e, 0xc6, 0x7f, 0x4f, 0x26, 0x38, 0xe9, 0xf1, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, + 0x5e, 0xb6, 0x4c, 0x79, 0x9d, 0x1d, 0x00, 0x00, } diff --git a/pkg/proto/group/group.proto b/pkg/proto/group/group.proto index 89e21effd..194a49842 100644 --- a/pkg/proto/group/group.proto +++ b/pkg/proto/group/group.proto @@ -10,18 +10,18 @@ message CreateGroupReq{ repeated string initMemberList = 1; server_api_params.GroupInfo groupInfo = 2; repeated string adminUserIDs = 3; - string ownerUserID = 5; //owner + string ownerUserID = 4; //owner } message CreateGroupResp{ - server_api_params.GroupInfo groupInfo = 3; + server_api_params.GroupInfo groupInfo = 1; } message GetGroupsInfoReq{ - repeated string groupIDList = 1; + repeated string groupIDs = 1; } message GetGroupsInfoResp{ - repeated server_api_params.GroupInfo groupInfoList = 3; + repeated server_api_params.GroupInfo groupInfos = 1; } @@ -34,11 +34,11 @@ message SetGroupInfoResp{ message GetGroupApplicationListReq { server_api_params.RequestPagination pagination = 1; - string fromUserID = 3; //owner or admin + string fromUserID = 2; //owner or admin } message GetGroupApplicationListResp { int32 total = 1; - repeated server_api_params.GroupRequest groupRequestList = 3; + repeated server_api_params.GroupRequest groupRequests = 2; } message GetUserReqApplicationListReq{ @@ -48,7 +48,7 @@ message GetUserReqApplicationListReq{ message GetUserReqApplicationListResp{ int32 total = 1; - repeated server_api_params.GroupRequest groupRequestList = 2; + repeated server_api_params.GroupRequest groupRequests = 2; } @@ -64,18 +64,18 @@ message TransferGroupOwnerResp{ message JoinGroupReq{ string groupID = 1; string reqMessage = 2; - int32 joinSource = 5; - string inviterUserID = 6; + int32 joinSource = 3; + string inviterUserID = 4; } message JoinGroupResp{ } message GroupApplicationResponseReq{ - string groupID = 3; - string fromUserID = 4; // - string handledMsg = 5; - int32 handleResult = 6; + string groupID = 1; + string fromUserID = 2; // + string handledMsg = 3; + int32 handleResult = 4; } message GroupApplicationResponseResp{ @@ -93,13 +93,13 @@ message QuitGroupResp{ message GetGroupMemberListReq { string groupID = 1; - int32 filter = 4; - server_api_params.RequestPagination pagination = 2; + int32 filter = 2; + server_api_params.RequestPagination pagination = 4; } message GetGroupMemberListResp { int32 total = 1; - repeated server_api_params.GroupMemberFullInfo memberList = 3; + repeated server_api_params.GroupMemberFullInfo members = 2; } @@ -109,7 +109,7 @@ message GetGroupMembersInfoReq { } message GetGroupMembersInfoResp { - repeated server_api_params.GroupMemberFullInfo memberList = 3; + repeated server_api_params.GroupMemberFullInfo members = 1; } message KickGroupMemberReq { @@ -129,14 +129,14 @@ message GetJoinedGroupListReq { } message GetJoinedGroupListResp{ int32 total = 1; - repeated server_api_params.GroupInfo groupList = 3; + repeated server_api_params.GroupInfo groups = 2; } message InviteUserToGroupReq { - string groupID = 3; - string reason = 4; - repeated string invitedUserIDList = 5; + string groupID = 1; + string reason = 2; + repeated string invitedUserIDs = 3; } message InviteUserToGroupResp { @@ -145,11 +145,10 @@ message InviteUserToGroupResp { message GetGroupAllMemberReq { string groupID = 1; - int32 offset = 4; - int32 count = 5; + server_api_params.RequestPagination pagination = 2; } message GetGroupAllMemberResp { - repeated server_api_params.GroupMemberFullInfo memberList = 3; + repeated server_api_params.GroupMemberFullInfo members = 1; } message CMSGroup { @@ -167,7 +166,7 @@ message GetGroupsReq { message GetGroupsResp { repeated CMSGroup groups = 1; - int32 GroupNum = 3; + int32 GroupNum = 2; } message GetGroupMemberReq { @@ -187,7 +186,7 @@ message GetGroupMembersCMSResp { } message DismissGroupReq{ - string groupID = 3; + string groupID = 1; } message DismissGroupResp{ @@ -195,9 +194,9 @@ message DismissGroupResp{ message MuteGroupMemberReq{ - string groupID = 3; - string userID = 4; - uint32 mutedSeconds = 5; + string groupID = 1; + string userID = 2; + uint32 mutedSeconds = 3; } message MuteGroupMemberResp{ @@ -206,8 +205,8 @@ message MuteGroupMemberResp{ message CancelMuteGroupMemberReq{ - string groupID = 3; - string userID = 4; + string groupID = 1; + string userID = 2; } message CancelMuteGroupMemberResp{ @@ -215,7 +214,7 @@ message CancelMuteGroupMemberResp{ message MuteGroupReq{ - string groupID = 3; + string groupID = 1; } message MuteGroupResp{ @@ -224,7 +223,7 @@ message MuteGroupResp{ message CancelMuteGroupReq{ - string groupID = 3; + string groupID = 1; } message CancelMuteGroupResp{ @@ -236,7 +235,7 @@ message CancelMuteGroupResp{ message SetGroupMemberNicknameReq{ string groupID = 1; string nickname = 2; - string userID = 5; + string userID = 3; } message SetGroupMemberNicknameResp{ } @@ -248,24 +247,24 @@ message GetJoinedSuperGroupListReq { message GetJoinedSuperGroupListResp { int32 total = 1; - repeated server_api_params.GroupInfo groupList = 3; + repeated server_api_params.GroupInfo groups = 2; } message GetSuperGroupsInfoReq { - repeated string groupIDList = 1; + repeated string groupIDs = 1; } message GetSuperGroupsInfoResp { - repeated server_api_params.GroupInfo groupInfoList = 3; + repeated server_api_params.GroupInfo groupInfos = 1; } message SetGroupMemberInfoReq{ string groupID = 1; string userID = 2; - google.protobuf.StringValue nickname = 5; - google.protobuf.StringValue faceURL = 6; - google.protobuf.Int32Value roleLevel = 7; - google.protobuf.StringValue ex = 8; + google.protobuf.StringValue nickname = 3; + google.protobuf.StringValue faceURL = 4; + google.protobuf.Int32Value roleLevel = 5; + google.protobuf.StringValue ex = 6; } message SetGroupMemberInfoResp{ @@ -286,6 +285,13 @@ message GetGroupAbstractInfoResp{ repeated GroupAbstractInfo groupAbstractInfos = 1; } +message getUserInGroupMembersReq { + string userID = 1; + repeated string groupIDs = 2; +} +message getUserInGroupMembersResp{ + repeated server_api_params.GroupMemberFullInfo members = 1; +} service group{ //创建群 @@ -317,30 +323,32 @@ service group{ //邀请某些人进群 rpc inviteUserToGroup(InviteUserToGroupReq) returns (InviteUserToGroupResp); - rpc GetGroups(GetGroupsReq) returns(GetGroupsResp); - rpc GetGroupMembersCMS(GetGroupMembersCMSReq) returns(GetGroupMembersCMSResp); + rpc getGroups(GetGroupsReq) returns(GetGroupsResp); + rpc getGroupMembersCMS(GetGroupMembersCMSReq) returns(GetGroupMembersCMSResp); //解散群 - rpc DismissGroup(DismissGroupReq) returns(DismissGroupResp); + rpc dismissGroup(DismissGroupReq) returns(DismissGroupResp); //对某个群成员禁言 - rpc MuteGroupMember(MuteGroupMemberReq) returns(MuteGroupMemberResp); + rpc muteGroupMember(MuteGroupMemberReq) returns(MuteGroupMemberResp); //对某个群成员取消禁言 - rpc CancelMuteGroupMember(CancelMuteGroupMemberReq) returns(CancelMuteGroupMemberResp); + rpc cancelMuteGroupMember(CancelMuteGroupMemberReq) returns(CancelMuteGroupMemberResp); //对某个群禁言 - rpc MuteGroup(MuteGroupReq) returns(MuteGroupResp); + rpc muteGroup(MuteGroupReq) returns(MuteGroupResp); //对某个群取消禁言 - rpc CancelMuteGroup(CancelMuteGroupReq) returns(CancelMuteGroupResp); + rpc cancelMuteGroup(CancelMuteGroupReq) returns(CancelMuteGroupResp); //获取某个用户加入的超级群 - rpc GetJoinedSuperGroupList(GetJoinedSuperGroupListReq) returns (GetJoinedSuperGroupListResp); + rpc getJoinedSuperGroupList(GetJoinedSuperGroupListReq) returns (GetJoinedSuperGroupListResp); //获取指定的超级群信息 - rpc GetSuperGroupsInfo(GetSuperGroupsInfoReq) returns (GetSuperGroupsInfoResp); + rpc getSuperGroupsInfo(GetSuperGroupsInfoReq) returns (GetSuperGroupsInfoResp); //设置群成员昵称 - rpc SetGroupMemberNickname(SetGroupMemberNicknameReq) returns (SetGroupMemberNicknameResp); + rpc setGroupMemberNickname(SetGroupMemberNicknameReq) returns (SetGroupMemberNicknameResp); //设置群成员信息 - rpc SetGroupMemberInfo(SetGroupMemberInfoReq) returns (SetGroupMemberInfoResp); + rpc setGroupMemberInfo(SetGroupMemberInfoReq) returns (SetGroupMemberInfoResp); //获取群信息hash值 - rpc GetGroupAbstractInfo(GetGroupAbstractInfoReq) returns (GetGroupAbstractInfoResp); + rpc getGroupAbstractInfo(GetGroupAbstractInfoReq) returns (GetGroupAbstractInfoResp); + //获取某个用户在指定群中的信息 + rpc getUserInGroupMembers(getUserInGroupMembersReq) returns (getUserInGroupMembersResp); }