GroupClient

This commit is contained in:
withchao
2023-05-17 11:42:00 +08:00
parent 7a3ff78d5a
commit eccb8b7b30
2 changed files with 9 additions and 3 deletions
+8 -2
View File
@@ -114,7 +114,10 @@ func (g *GroupClient) GetOwnerAndAdminInfos(ctx context.Context, groupID string)
GroupID: groupID,
RoleLevels: []int32{constant.GroupOwner, constant.GroupAdmin},
})
return resp.Members, err
if err != nil {
return nil, err
}
return resp.Members, nil
}
func (g *GroupClient) GetOwnerInfo(ctx context.Context, groupID string) (*sdkws.GroupMemberFullInfo, error) {
@@ -137,5 +140,8 @@ func (g *GroupClient) GetGroupMemberIDs(ctx context.Context, groupID string) ([]
resp, err := group.NewGroupClient(cc).GetGroupMemberUserIDs(ctx, &group.GetGroupMemberUserIDsReq{
GroupID: groupID,
})
return resp.UserIDs, err
if err != nil {
return nil, err
}
return resp.UserIDs, nil
}