@@ -74,11 +74,16 @@ export const zoomUserSettingsSchema = z.object({
7474 default_password_for_scheduled_meetings : z . string ( ) . nullish ( ) ,
7575 } )
7676 . nullish ( ) ,
77+ in_meeting : z
78+ . object ( {
79+ waiting_room : z . boolean ( ) ,
80+ } )
81+ . nullish ( ) ,
7782} ) ;
7883
7984// https://developers.zoom.us/docs/api/rest/reference/user/methods/#operation/userSettings
8085// append comma separated settings here, to retrieve only these specific settings
81- const settingsApiFilterResp = "default_password_for_scheduled_meetings,auto_recording" ;
86+ const settingsApiFilterResp = "default_password_for_scheduled_meetings,auto_recording,waiting_room " ;
8287
8388type ZoomRecurrence = {
8489 end_date_time ?: string ;
@@ -169,6 +174,7 @@ const ZoomVideoApiAdapter = (credential: CredentialPayload): VideoApiAdapter =>
169174
170175 const userSettings = await getUserSettings ( ) ;
171176 const recurrence = getRecurrence ( event ) ;
177+ const waitingRoomEnabled = userSettings ?. in_meeting ?. waiting_room ?? false ;
172178 // Documentation at: https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate
173179 return {
174180 topic : event . title ,
@@ -184,7 +190,7 @@ const ZoomVideoApiAdapter = (credential: CredentialPayload): VideoApiAdapter =>
184190 participant_video : true ,
185191 cn_meeting : false , // TODO: true if host meeting in China
186192 in_meeting : false , // TODO: true if host meeting in India
187- join_before_host : true ,
193+ join_before_host : ! waitingRoomEnabled ,
188194 mute_upon_entry : false ,
189195 watermark : false ,
190196 use_pmi : false ,
@@ -193,6 +199,7 @@ const ZoomVideoApiAdapter = (credential: CredentialPayload): VideoApiAdapter =>
193199 auto_recording : userSettings ?. recording ?. auto_recording || "none" ,
194200 enforce_login : false ,
195201 registrants_email_notification : true ,
202+ waiting_room : waitingRoomEnabled ,
196203 } ,
197204 ...recurrence ,
198205 } ;
0 commit comments