From c81fb9ceca014a7d698d04a7987bc3867e2ef814 Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Fri, 7 Apr 2023 12:07:54 +0800 Subject: [PATCH] group --- internal/rpc/group/group.go | 6 +++--- pkg/proto/group/group.pb.go | 10 +++++----- pkg/proto/group/group.proto | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 5b5a9fa6a..e41fbfc69 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -449,13 +449,13 @@ 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{} - if len(req.Members) == 0 { - return nil, errs.ErrArgs.Wrap("members empty") + if len(req.UserIDs) == 0 { + return nil, errs.ErrArgs.Wrap("userIDs empty") } if req.GroupID == "" { return nil, errs.ErrArgs.Wrap("groupID empty") } - members, err := s.GroupDatabase.FindGroupMember(ctx, []string{req.GroupID}, req.Members, nil) + members, err := s.GroupDatabase.FindGroupMember(ctx, []string{req.GroupID}, req.UserIDs, nil) if err != nil { return nil, err } diff --git a/pkg/proto/group/group.pb.go b/pkg/proto/group/group.pb.go index 4eaa00931..cd9aa9568 100644 --- a/pkg/proto/group/group.pb.go +++ b/pkg/proto/group/group.pb.go @@ -1071,7 +1071,7 @@ type GetGroupMembersInfoReq struct { unknownFields protoimpl.UnknownFields GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` - Members []string `protobuf:"bytes,2,rep,name=members,proto3" json:"members"` + UserIDs []string `protobuf:"bytes,2,rep,name=userIDs,proto3" json:"userIDs"` } func (x *GetGroupMembersInfoReq) Reset() { @@ -1113,9 +1113,9 @@ func (x *GetGroupMembersInfoReq) GetGroupID() string { return "" } -func (x *GetGroupMembersInfoReq) GetMembers() []string { +func (x *GetGroupMembersInfoReq) GetUserIDs() []string { if x != nil { - return x.Members + return x.UserIDs } return nil } @@ -3319,8 +3319,8 @@ var file_group_group_proto_rawDesc = []byte{ 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x18, 0x0a, - 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x5c, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x47, 0x72, + 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x22, 0x5c, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x41, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, diff --git a/pkg/proto/group/group.proto b/pkg/proto/group/group.proto index 66676cd9b..514d90ff3 100644 --- a/pkg/proto/group/group.proto +++ b/pkg/proto/group/group.proto @@ -104,7 +104,7 @@ message GetGroupMemberListResp { message GetGroupMembersInfoReq { string groupID = 1; - repeated string members = 2; + repeated string userIDs = 2; } message GetGroupMembersInfoResp {