From d3161730efbd6a07e333ddba439622e5d5a1518f Mon Sep 17 00:00:00 2001 From: Igor Loskutov Date: Thu, 5 Feb 2026 19:43:25 -0500 Subject: [PATCH] fix: use SDK DailyFatalErrorType, add meeting-full/not-allowed/exp-token cases, remove dead end_date fallback --- server/reflector/worker/ics_sync.py | 5 +-- www/app/[roomName]/components/DailyRoom.tsx | 43 ++++++++++++++++++--- 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/server/reflector/worker/ics_sync.py b/server/reflector/worker/ics_sync.py index 5feb80c8..f02a2ddd 100644 --- a/server/reflector/worker/ics_sync.py +++ b/server/reflector/worker/ics_sync.py @@ -83,9 +83,6 @@ def _should_sync(room) -> bool: return time_since_sync.total_seconds() >= room.ics_fetch_interval -MEETING_DEFAULT_DURATION = timedelta(hours=1) - - async def create_upcoming_meetings_for_event( event: CalendarEvent, create_window: datetime, room: Room ): @@ -98,7 +95,7 @@ async def create_upcoming_meetings_for_event( # Prevent duplicate meetings from aggregated calendar feeds # (e.g. same event appears with different UIDs from Cal.com and Google Calendar) - end_date = event.end_time or (event.start_time + MEETING_DEFAULT_DURATION) + end_date = event.end_time existing_by_time = await meetings_controller.get_by_room_and_time_window( room, event.start_time, end_date ) diff --git a/www/app/[roomName]/components/DailyRoom.tsx b/www/app/[roomName]/components/DailyRoom.tsx index 0e620cb8..9790a5e0 100644 --- a/www/app/[roomName]/components/DailyRoom.tsx +++ b/www/app/[roomName]/components/DailyRoom.tsx @@ -17,6 +17,7 @@ import DailyIframe, { DailyCustomTrayButtons, DailyEventObjectCustomButtonClick, DailyEventObjectFatalError, + DailyFatalErrorType, DailyFactoryOptions, DailyParticipantsObject, } from "@daily-co/daily-js"; @@ -97,6 +98,41 @@ function FatalErrorScreen({ ); + case "meeting-full": + return ( +
+ + This meeting is full. + + +
+ ); + case "not-allowed": + return ( +
+ + + You are not allowed to join this meeting. + + + +
+ ); + case "exp-token": + return ( +
+ + Your session has expired. + + +
+ ); default: return (
@@ -148,12 +184,7 @@ const USE_FRAME_INIT_STATE = { joined: false as boolean, } as const; -type DailyFatalErrorType = - | "connection-error" - | "exp-room" - | "ejected" - | (string & {}); -type FatalError = { type: DailyFatalErrorType; message: string }; +type FatalError = { type: DailyFatalErrorType | "unknown"; message: string }; // Daily js and not Daily react used right now because daily-js allows for prebuild interface vs. -react is customizable but has no nice defaults const useFrame = (