Fix edge case of importing exactly enough members to hit the cap
It's OK if import will bring us to the cap (1000), just don't let the count go beyond that.
This commit is contained in:
@@ -121,7 +121,7 @@ namespace PluralKit.Bot
|
||||
|
||||
// If creating the unmatched members would put us over the member limit, abort before creating any members
|
||||
// new total: # in the system + (# in the file - # in the file that already exist)
|
||||
if (data.Members.Count - dataFileToMemberMapping.Count + existingMembers.Count() >= Limits.MaxMemberCount)
|
||||
if (data.Members.Count - dataFileToMemberMapping.Count + existingMembers.Count() > Limits.MaxMemberCount)
|
||||
{
|
||||
result.Success = false;
|
||||
result.Message = $"Import would exceed the maximum number of members ({Limits.MaxMemberCount}).";
|
||||
|
Reference in New Issue
Block a user