File tree Expand file tree Collapse file tree
packages/app-store/zoomvideo/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,6 +155,18 @@ const ZoomVideoApiAdapter = (credential: CredentialPayload): VideoApiAdapter =>
155155 } ;
156156 } ;
157157
158+ // Zoom agenda field has a 2000 character limit; we set maxLength to 1900 to leave a safety buffer
159+ const truncateAgenda = ( description ?: string | null ) => {
160+ if ( ! description ) return description ;
161+
162+ const maxLength = 1900 ;
163+ const trimmed = description . trimEnd ( ) ;
164+ if ( trimmed . length > maxLength ) {
165+ return `${ trimmed . substring ( 0 , maxLength ) . trimEnd ( ) } ...` ;
166+ }
167+ return trimmed ;
168+ } ;
169+
158170 const userSettings = await getUserSettings ( ) ;
159171 const recurrence = getRecurrence ( event ) ;
160172 // Documentation at: https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate
@@ -166,7 +178,7 @@ const ZoomVideoApiAdapter = (credential: CredentialPayload): VideoApiAdapter =>
166178 //schedule_for: "string", TODO: Used when scheduling the meeting for someone else (needed?)
167179 timezone : event . organizer . timeZone ,
168180 password : userSettings ?. schedule_meeting ?. default_password_for_scheduled_meetings ?? undefined ,
169- agenda : event . description ,
181+ agenda : truncateAgenda ( event . description ) ,
170182 settings : {
171183 host_video : true ,
172184 participant_video : true ,
You can’t perform that action at this time.
0 commit comments