fix(bot): IsComplete must not flag null MaxPlayers as missing (no-limit)
PR Checks / test-and-build (pull_request) Successful in 12m33s
PR Checks / test-and-build (pull_request) Successful in 12m33s
After 3.9.6 fixed long-polling, the bot finally reaches the final '✅ Создать' step. Users pressing '♾ Без лимита' on the Capacity step get a valid payload where Single.MaxPlayers = null (the legitimate no-limit choice from GameCreationWizard.ApplyCapacityChoice 'no_limit'), but CreateSessionHandler.IsComplete then reports 'лимит мест' as missing, blocking session creation. This regression existed since 3.9.3 (when 'no_limit' was added) but stayed invisible because 3.9.4 and 3.9.5 never reached SubmitDraft (libgssapi-krb5 missing → long-polling hung). Once 3.9.6 restored polling, the bug surfaced immediately. Fix: drop the null-MaxPlayers check from IsComplete for Single type. Null is a valid 'no limit' state and must pass through to BuildCommands → shared handler, which already accepts null MaxPlayers correctly. Closes #131. Bump version 3.9.6 -> 3.9.7
This commit is contained in:
@@ -229,7 +229,11 @@ public sealed class CreateSessionHandler
|
||||
if (p.Type == WizardCreationType.Single)
|
||||
{
|
||||
if (p.Single?.ScheduledAt is null) missingFields.Add("дата/время");
|
||||
if (p.Single?.MaxPlayers is null) missingFields.Add("лимит мест");
|
||||
// MaxPlayers = null is a valid "♾ Без лимита" choice
|
||||
// (see GameCreationWizard.ApplyCapacityChoice "no_limit"). Only a
|
||||
// missing wizard step on the numeric-input path is a real defect;
|
||||
// a non-null 0 also blocks (zero players is never what the user
|
||||
// asked for). Treat null as "no limit" and accept it.
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user