From 5be6da2e9a2e4397bff3baba2f4b7b90275d1a89 Mon Sep 17 00:00:00 2001 From: Hossein Ahmadian-Yazdi Date: Fri, 11 Sep 2020 11:02:59 -0400 Subject: [PATCH] [MM-23651] No more than 256 members are allowed to be invited (#15414) * Update constant to 256 * update test Co-authored-by: Mattermod --- api4/team.go | 2 +- api4/team_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api4/team.go b/api4/team.go index 54b9ec298b..f60d916615 100644 --- a/api4/team.go +++ b/api4/team.go @@ -20,7 +20,7 @@ import ( ) const ( - MAX_ADD_MEMBERS_BATCH = 20 + MAX_ADD_MEMBERS_BATCH = 256 MAXIMUM_BULK_IMPORT_SIZE = 10 * 1024 * 1024 groupIDsParamPattern = "[^a-zA-Z0-9,]*" ) diff --git a/api4/team_test.go b/api4/team_test.go index 39627fd060..1212141efe 100644 --- a/api4/team_test.go +++ b/api4/team_test.go @@ -2161,7 +2161,7 @@ func TestAddTeamMembers(t *testing.T) { CheckNotFoundStatus(t, resp) // Test with many users. - for i := 0; i < 25; i++ { + for i := 0; i < 260; i++ { testUserList = append(testUserList, GenerateTestId()) } _, resp = Client.AddTeamMembers(team.Id, testUserList)