Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement maximum participants limit #157

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dev-kraken
Copy link

@dev-kraken dev-kraken commented Jan 14, 2025

Implement Maximum Participants Limit

This PR introduces a feature to limit the number of participants in a room.

Changes

  • Added MAX_PARTICIPANTS environment variable in wrangler.toml for example MAX_PARTICIPANTS = 10
  • Updated loader function to parse and validate MAX_PARTICIPANTS
  • Modified Lobby component to use maxParticipants for determining room capacity
  • Implemented UI changes to show when a room is full and prevent joining

How to test

  1. Set different values for MAX_PARTICIPANTS in wrangler.toml
  2. Run the application and try to join a room
  3. Verify that the room becomes full when the number of participants reaches the set limit
  4. Check that the UI updates correctly (button disabled, "Room Full" message shown)

Notes for reviewers

  • Ensure that the error handling for invalid MAX_PARTICIPANTS values is sufficient
  • Consider if we need additional logging or error reporting for when MAX_PARTICIPANTS is not set or invalid

close #140

- Add MAX_PARTICIPANTS environment variable in wrangler.toml
- Update loader to parse and validate MAX_PARTICIPANTS
- Modify Lobby component to use maxParticipants for determining room capacity
- Implement UI changes to show when a room is full and prevent joining
- Handle cases where MAX_PARTICIPANTS is not set or invalid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Suggestion: Limiting the number of participants per room
1 participant