This commit is contained in:
withchao 2023-04-07 12:07:54 +08:00
parent a83b4fc5d8
commit c81fb9ceca
3 changed files with 9 additions and 9 deletions

View File

@ -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) { func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetGroupMembersInfoReq) (*pbGroup.GetGroupMembersInfoResp, error) {
resp := &pbGroup.GetGroupMembersInfoResp{} resp := &pbGroup.GetGroupMembersInfoResp{}
if len(req.Members) == 0 { if len(req.UserIDs) == 0 {
return nil, errs.ErrArgs.Wrap("members empty") return nil, errs.ErrArgs.Wrap("userIDs empty")
} }
if req.GroupID == "" { if req.GroupID == "" {
return nil, errs.ErrArgs.Wrap("groupID empty") 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 { if err != nil {
return nil, err return nil, err
} }

View File

@ -1071,7 +1071,7 @@ type GetGroupMembersInfoReq struct {
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` 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() { func (x *GetGroupMembersInfoReq) Reset() {
@ -1113,9 +1113,9 @@ func (x *GetGroupMembersInfoReq) GetGroupID() string {
return "" return ""
} }
func (x *GetGroupMembersInfoReq) GetMembers() []string { func (x *GetGroupMembersInfoReq) GetUserIDs() []string {
if x != nil { if x != nil {
return x.Members return x.UserIDs
} }
return nil 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, 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, 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, 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, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 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, 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, 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, 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, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76,

View File

@ -104,7 +104,7 @@ message GetGroupMemberListResp {
message GetGroupMembersInfoReq { message GetGroupMembersInfoReq {
string groupID = 1; string groupID = 1;
repeated string members = 2; repeated string userIDs = 2;
} }
message GetGroupMembersInfoResp { message GetGroupMembersInfoResp {