Commit dd71a09b authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Remove hard cap on maximum number of users per group.

parent 9cdcae36
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr
- Filtering by user state in group users listing operations.
- Pagination support for user groups listing operations.
- Filtering by group state in user groups listing operations.
- Allow max count to be set when creating groups from client calls.

### Changed
- Use Go 1.12.7 on Alpine 3.10 as base Docker container image and native builds.
@@ -25,12 +26,14 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr
- User groups listing pages are now limited to max 100 results each.
- Group users listing now includes disabled (banned) users.
- User groups listing now includes disabled groups.
- Remove hard cap on maximum number of users per group.

### Fixed
- Handle updates during leaderboard schedule reset window.
- Ensure the matchmaker cannot match together tickets from the same session.
- Handle leaderboard deletes shortly before a scheduled reset.
- Listing user groups no longer returns an error when the user is a member of zero groups.
- Go runtime group creation now correctly validates max count.

## [2.6.0] - 2019-07-01
### Added
+225 −216

File changed.

Preview size limit exceeded, changes collapsed.

+2 −0
Original line number Diff line number Diff line
@@ -244,6 +244,8 @@ message CreateGroupRequest {
  string avatar_url = 4;
  // Mark a group as open or not where only admins can accept members.
  bool open = 5;
  // Maximum number of group members.
  int32 max_count = 6;
}

// Delete one or more friends for the current user.
+5 −0
Original line number Diff line number Diff line
@@ -2572,6 +2572,11 @@
          "type": "boolean",
          "format": "boolean",
          "description": "Mark a group as open or not where only admins can accept members."
        },
        "max_count": {
          "type": "integer",
          "format": "int32",
          "description": "Maximum number of group members."
        }
      },
      "description": "Create a group with the current user as owner."
+9 −1
Original line number Diff line number Diff line
@@ -54,7 +54,15 @@ func (s *ApiServer) CreateGroup(ctx context.Context, in *api.CreateGroupRequest)
		return nil, status.Error(codes.InvalidArgument, "Group name must be set.")
	}

	group, err := CreateGroup(ctx, s.logger, s.db, userID, userID, in.GetName(), in.GetLangTag(), in.GetDescription(), in.GetAvatarUrl(), "", in.GetOpen(), -1)
	maxCount := 100
	if mc := in.MaxCount; mc != 0 {
		if mc < 1 {
			return nil, status.Error(codes.InvalidArgument, "Group max count must be >= 1 when set.")
		}
		maxCount = int(mc)
	}

	group, err := CreateGroup(ctx, s.logger, s.db, userID, userID, in.GetName(), in.GetLangTag(), in.GetDescription(), in.GetAvatarUrl(), "", in.GetOpen(), maxCount)
	if err != nil {
		if err == ErrGroupNameInUse {
			return nil, status.Error(codes.InvalidArgument, "Group name is in use.")
Loading