feat: allow players to leave sessions
Deploy Telegram Bot / build-and-push (push) Failing after 39s
Deploy Telegram Bot / deploy (push) Has been skipped

This commit is contained in:
2026-04-24 17:57:13 +03:00
parent 9c91057798
commit f45985041b
13 changed files with 285 additions and 9 deletions
@@ -23,4 +23,14 @@ public static class SessionCapacityRules
return !maxPlayers.HasValue || activeParticipants < maxPlayers.Value;
}
public static bool ShouldPromoteAfterParticipantLeaves(
string removedRegistrationStatus,
int? maxPlayers,
int activeParticipantsAfterLeave,
int waitlistedParticipants)
{
return removedRegistrationStatus == ParticipantRegistrationStatus.Active
&& CanPromoteWaitlistedPlayer(maxPlayers, activeParticipantsAfterLeave, waitlistedParticipants);
}
}