-
Notifications
You must be signed in to change notification settings - Fork 134
Attendee count display in video rooms #1294
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
base: enext
Are you sure you want to change the base?
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR enhances the live room view count logic by caching view counts in Redis with a TTL, detecting stage‐type rooms via module configuration, and broadcasting either an exact or an approximate attendee count over WebSocket based on room type. Sequence diagram for broadcasting attendee count based on room typesequenceDiagram
participant RoomModule
participant Redis
participant "Room Logic"
participant WebSocket
RoomModule->>"Room Logic": Provide room.module_config
"Room Logic"->>Redis: Get/Set view count for room
Redis-->>"Room Logic": Return previous view count
"Room Logic"->>"Room Logic": Determine room type (stage or video chat)
"Room Logic"->>"Room Logic": Select count (exact or approximate)
"Room Logic"->>WebSocket: Broadcast user_count_change with selected count
Class diagram for updated room view count logicclassDiagram
class Room {
pk: int
module_config: list
}
class RoomLogic {
_update_view_count(room, actual_view_count)
}
class Redis {
getset(key, value)
expire(key, ttl)
}
class approximate_view_number {
<<function>>
}
RoomLogic --> Room : uses
RoomLogic --> Redis : caches view count
RoomLogic --> approximate_view_number : uses for video chat rooms
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@mariobehling please review when you have a moment |
mariobehling
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The number should have the same color as the people icon. Alignment should also be the same. The room name should have the same color as the "stage" icon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements differentiated attendee count display for video rooms based on room type. Stage rooms (livestream) now display exact numeric counts, while video chat rooms show approximate values ("none", "few", "many") for privacy. The implementation uses Redis caching with a 15-minute expiry and broadcasts user count changes via WebSocket.
Key Changes:
- Added room type detection logic based on module configuration to differentiate stage rooms from video chat rooms
- Implemented conditional user count reporting: exact counts for stage rooms, approximate for video chat rooms
- WebSocket broadcasts now send either integer or string values depending on room type
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Stage: livestream.youtube, livestream.iframe -> exact numbers | ||
| # Video chat: livestream.native, BBB -> "none"/"few"/"many" |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment incorrectly classifies 'livestream.native' as a video chat room, but the STAGE_ROOM_MODULE_TYPES constant includes 'livestream.native' as a stage room type (line 57). This creates a contradiction between the comment and the implementation.
| # Stage: livestream.youtube, livestream.iframe -> exact numbers | |
| # Video chat: livestream.native, BBB -> "none"/"few"/"many" | |
| # Stage: livestream.youtube, livestream.iframe, livestream.native -> exact numbers | |
| # Video chat: BBB -> "none"/"few"/"many" |
| for module in room.module_config or [] | ||
| ) | ||
|
|
||
| # For stage rooms, use actual count; for stream/video chat rooms, use approximate text |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] This comment is redundant and repeats the logic already explained in the comment block above (lines 198-200). Remove this duplicate explanation.
| # For stage rooms, use actual count; for stream/video chat rooms, use approximate text |
Issue
Description
Summary by Sourcery
Update live room view count handling to differentiate stage rooms and video chat rooms, broadcasting either exact or approximate attendee numbers over WebSocket with Redis caching.
New Features:
Enhancements: