-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
apiaudio-mediabugSomething isn't workingSomething isn't workingci-cddependenciesenhancementNew feature or requestNew feature or requestevent-drivenquestionFurther information is requestedFurther information is requestedreal-timesecurity
Description
Feature: Implement GET /history & PATCH /{room_code}/config — Meeting Management Supplementary Endpoints
Problem
The core room lifecycle endpoints (create, join, leave, end) are covered in the Room & Meeting Management issue. However, two supporting capabilities are still missing: hosts cannot review past meetings, and room settings cannot be changed after a room has been created. Without meeting history, hosts have no record of their activity. Without a config endpoint, settings like lock_room and enable_transcription are fixed at creation time and cannot adapt to the meeting's needs as it progresses.
Proposed Solution
Implement two endpoints as part of the existing app/api/v1/endpoints/meetings.py router:
GET /api/v1/meetings/history— paginated list of meetings hosted by the authenticated user, ordered by recency.PATCH /api/v1/meetings/{room_code}/config— partial update of a room's live settings, callable only by the host and only while the meeting isactive.
User Stories
- As a host, I want to view a list of my past meetings with their date, duration, and participant count, so I can reference previous sessions and follow up with participants.
- As a host, I want to lock my room mid-meeting to prevent new participants from joining, so I can control access once the session has started.
- As a host, I want to toggle live transcription on or off during a meeting, so I can enable it only when participants need it.
Acceptance Criteria
GET /api/v1/meetings/history
- Requires a valid
Authorization: Bearer <access_token>header. - Returns a paginated list of meetings where
host_id = current_user.idandstatus = "ended":{ "total": 42, "page": 1, "page_size": 20, "items": [ { "room_code": "abc123xyz", "name": "Weekly Sync", "created_at": "2026-03-14T10:00:00Z", "ended_at": "2026-03-14T11:02:00Z", "duration_minutes": 62, "participant_count": 5 } ] } - Supports
?page=1&page_size=20query parameters.page_sizeis capped at 100. duration_minutesis computed as(ended_at - created_at).total_seconds() / 60, rounded to the nearest minute.participant_countis the count of distinctParticipantrecords for the room.
PATCH /api/v1/meetings/{room_code}/config
- Requires a valid
Authorization: Bearer <access_token>header. - Returns
403 Forbiddenif the authenticated user is not the room's host. - Returns
404 Not Foundif theroom_codedoes not exist. - Returns
400 Bad Requestwith codeROOM_NOT_ACTIVEif the room'sstatusis not"active". - Accepts a JSON body with any combination of the following fields (all optional):
{ "lock_room": true, "enable_transcription": false, "max_participants": 10 } - Updates the
room.settingsJSON column in PostgreSQL with the provided fields (partial merge — unspecified keys retain their current values). - Broadcasts a WebSocket event to all room participants to propagate the config change in real-time:
{ "event": "room_config_updated", "settings": { "lock_room": true, "enable_transcription": false } } - Returns
200 OKwith the full updated room settings.
Proposed Technical Details
- Router:
app/api/v1/endpoints/meetings.py— addsGET /historyandPATCH /{room_code}/configto the existing meetings router. - Schemas in
app/schemas/room.py:MeetingHistoryItem—room_code,name,created_at,ended_at,duration_minutes,participant_count.PaginatedMeetingHistory—total,page,page_size,items: list[MeetingHistoryItem].RoomConfigUpdate—lock_room: bool | None,enable_transcription: bool | None,max_participants: int | None.
- CRUD in
app/crud/room.py:get_meeting_history(db, host_id, page, page_size) -> tuple[int, list[Room]]update_room_config(db, room, config: RoomConfigUpdate) -> Room
- WebSocket Broadcast:
ConnectionManager.broadcast_to_room(room_code, message)called after config update (reuses theConnectionManagerfrom the Real-Time Audio issue). - New/Modified Files:
app/api/v1/endpoints/meetings.py— add the two routes [MODIFY]app/schemas/room.py— addMeetingHistoryItem,PaginatedMeetingHistory,RoomConfigUpdate[MODIFY]app/crud/room.py— addget_meeting_history,update_room_config[MODIFY]
Tasks
- Add
MeetingHistoryItem,PaginatedMeetingHistory, andRoomConfigUpdatetoapp/schemas/room.py. - Implement
get_meeting_historyinapp/crud/room.py(withparticipant_countsubquery). - Implement
GET /api/v1/meetings/historywith pagination support. - Implement
update_room_configinapp/crud/room.py(partial JSON merge). - Implement
PATCH /api/v1/meetings/{room_code}/configwith host-only guard and active-room check. - Integrate
ConnectionManager.broadcast_to_roomto push the config change to connected participants. - Write unit tests for
get_meeting_historyandupdate_room_configCRUD. - Write integration tests: history pagination, config update (host, non-host
403, ended room400), and WebSocket broadcast.
Open Questions/Considerations
- Should
GET /historyalso include meetings the user participated in as a guest, not just meetings they hosted? If so, it needs a separate query and arolefilter parameter. - Should
PATCH /{room_code}/configalso be callable forpendingrooms (before the meeting starts), or strictly limited toactiverooms? - If
lock_roomis set totruemid-meeting, should participants already in the lobby be automatically rejected, or should the host still manually admit or reject them?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
apiaudio-mediabugSomething isn't workingSomething isn't workingci-cddependenciesenhancementNew feature or requestNew feature or requestevent-drivenquestionFurther information is requestedFurther information is requestedreal-timesecurity