feat: add BigBlueButton conferencing integration#29437
Conversation
|
Welcome to Cal.diy, @Simultech369! Thanks for opening this pull request. A few things to keep in mind:
A maintainer will review your PR soon. Thanks for contributing! |
|
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThis pull request adds BigBlueButton video conferencing support: it registers "bigbluebutton-video" in API↔internal integration mappings and platform types, provides a BigBlueButton app package (metadata, package.json, Zod schemas, exports), implements an installation API to create app credentials, and supplies a VideoApiAdapter implementing createMeeting, deleteMeeting, and updateMeeting. Autogenerated registry files are updated to wire the app and adapter into the app store. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/app-store/bigbluebutton/api/add.ts`:
- Around line 14-21: Parse and validate req.query.teamId once before using it:
read teamId from req.query, attempt to convert to an integer (e.g.,
parseInt/Number and check !isNaN and >0), and if the value is present but
invalid return a 400 response; then pass the validated numeric teamId to
throwIfNotHaveAdminAccessToTeam and use that same parsedTeamId when building
installForObject (instead of calling Number(teamId) inline). Ensure you handle
the absent teamId case by using req.session.user.id for installForObject as
before.
- Around line 33-46: Replace the generic Error throws in the BigBlueButton
installation flow with ErrorWithCode: when detecting an existing installation
(the "Already installed" throw) use ErrorWithCode with a conflict/code
indicating existing resource, and when creating the credential fails after
prisma.credential.create (the "Unable to create user credential for
BigBlueButton" throw) use ErrorWithCode with an internal/error code; update the
two throw sites in add.ts near the installation check and the installation
creation block so callers receive explicit status codes.
In `@packages/app-store/bigbluebutton/lib/VideoApiAdapter.ts`:
- Around line 104-106: The code currently splits uid with uid.split(":"), which
fails when meetingID contains colons; change the parsing to split on the last
colon instead: find the lastIndexOf(":") on uid, use substring(0, lastIdx) as
meetingID and substring(lastIdx+1) as moderatorPW, and handle the case where
lastIdx < 0 (no colon) by returning early like the existing check; update
references to meetingID and moderatorPW accordingly (uid, meetingID,
moderatorPW).
In `@packages/app-store/bookerApps.metadata.generated.ts`:
- Around line 5-7: Reorder the top-level imports in
packages/app-store/bookerApps.metadata.generated.ts so they are alphabetized to
match the exported object: ensure campfire_config_json,
bigbluebutton__metadata_ts, dailyvideo__metadata_ts (and any other imports)
appear in alphabetical order; update the import statements so their order
matches the keys used in the exported metadata object (refer to the import
identifiers campfire_config_json and bigbluebutton__metadata_ts) to remove the
inconsistency between import order and exported property order.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ec44e388-67d1-44f0-b95a-53fb13f4063f
⛔ Files ignored due to path filters (1)
packages/app-store/bigbluebutton/static/icon.svgis excluded by!**/*.svg
📒 Files selected for processing (22)
apps/api/v2/src/platform/bookings/2024-08-13/services/booking-video.service.tsapps/api/v2/src/platform/event-types/event-types_2024_06_14/transformers/api-to-internal/locations.tsapps/api/v2/src/platform/event-types/event-types_2024_06_14/transformers/internal-to-api/locations.tsapps/api/v2/src/platform/event-types/event-types_2024_06_14/transformers/internal/locations.tspackages/app-store/apps.keys-schemas.generated.tspackages/app-store/apps.metadata.generated.tspackages/app-store/apps.schemas.generated.tspackages/app-store/apps.server.generated.tspackages/app-store/bigbluebutton/DESCRIPTION.mdpackages/app-store/bigbluebutton/_metadata.tspackages/app-store/bigbluebutton/api/add.tspackages/app-store/bigbluebutton/api/index.tspackages/app-store/bigbluebutton/index.tspackages/app-store/bigbluebutton/lib/VideoApiAdapter.tspackages/app-store/bigbluebutton/lib/index.tspackages/app-store/bigbluebutton/package.jsonpackages/app-store/bigbluebutton/zod.tspackages/app-store/bookerApps.metadata.generated.tspackages/app-store/video.adapters.generated.tspackages/platform/types/bookings/2024-08-13/inputs/location.input.tspackages/platform/types/event-types/event-types_2024_06_14/inputs/locations.input.tspackages/platform/types/event-types/event-types_2024_06_14/outputs/locations.output.ts
cb21745 to
efd7a17
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/app-store/bigbluebutton/lib/VideoApiAdapter.ts`:
- Around line 77-79: Replace the generic Error throws in the BigBlueButton XML
response handling with ErrorWithCode so downstream error handlers can map
failure types: where the code currently throws new Error(message) after checking
createResponse.ok or returnCode (using variables createResponse, returnCode,
createXml and helper getXmlTag), construct and throw an ErrorWithCode instance
instead, passing the extracted message and a meaningful code (e.g., the
returnCode or a fallback) so the error contains both message and
machine-readable code; do the same for the second throw in the deletion flow
(the similar throw around the variables used at lines ~130-132).
- Around line 136-142: updateMeeting currently force-casts
bookingRef.meetingId/meetingPassword/meetingUrl to string which can propagate
null/undefined into the required VideoCallData; instead, in the updateMeeting
implementation (function updateMeeting in VideoApiAdapter.ts) validate that
bookingRef.meetingId, meetingPassword, and meetingUrl are present and
non-null/undefined and if any are missing reject/throw a descriptive error (e.g.
"missing meetingId") or otherwise return a safe fallback so the returned
Promise<VideoCallData> always contains real strings for id/password/url; update
the Promise resolution to use the validated values (or fail fast) rather than
using `as string`.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d0e19666-a825-41fb-9a10-fdceaea1448f
⛔ Files ignored due to path filters (1)
packages/app-store/bigbluebutton/static/icon.svgis excluded by!**/*.svg
📒 Files selected for processing (22)
apps/api/v2/src/platform/bookings/2024-08-13/services/booking-video.service.tsapps/api/v2/src/platform/event-types/event-types_2024_06_14/transformers/api-to-internal/locations.tsapps/api/v2/src/platform/event-types/event-types_2024_06_14/transformers/internal-to-api/locations.tsapps/api/v2/src/platform/event-types/event-types_2024_06_14/transformers/internal/locations.tspackages/app-store/apps.keys-schemas.generated.tspackages/app-store/apps.metadata.generated.tspackages/app-store/apps.schemas.generated.tspackages/app-store/apps.server.generated.tspackages/app-store/bigbluebutton/DESCRIPTION.mdpackages/app-store/bigbluebutton/_metadata.tspackages/app-store/bigbluebutton/api/add.tspackages/app-store/bigbluebutton/api/index.tspackages/app-store/bigbluebutton/index.tspackages/app-store/bigbluebutton/lib/VideoApiAdapter.tspackages/app-store/bigbluebutton/lib/index.tspackages/app-store/bigbluebutton/package.jsonpackages/app-store/bigbluebutton/zod.tspackages/app-store/bookerApps.metadata.generated.tspackages/app-store/video.adapters.generated.tspackages/platform/types/bookings/2024-08-13/inputs/location.input.tspackages/platform/types/event-types/event-types_2024_06_14/inputs/locations.input.tspackages/platform/types/event-types/event-types_2024_06_14/outputs/locations.output.ts
✅ Files skipped from review due to trivial changes (9)
- packages/app-store/bigbluebutton/_metadata.ts
- packages/app-store/bigbluebutton/api/index.ts
- packages/app-store/video.adapters.generated.ts
- packages/app-store/apps.server.generated.ts
- packages/app-store/bigbluebutton/package.json
- packages/app-store/apps.keys-schemas.generated.ts
- packages/app-store/apps.schemas.generated.ts
- packages/app-store/apps.metadata.generated.ts
- packages/app-store/bigbluebutton/index.ts
|
please attach a working demo in the description. making it draft til then. |
|
@Simultech369 please submit appropriate demo, closing! |
|
Hey @bandhan-majumder — there is a working demo video attached at the top of the PR description: It shows the integration flow working end-to-end. If that satisfies the demo requirement, could you please reopen the PR for review? |
23-43-18.mp4
Closes #1985
Adds BigBlueButton as a conferencing app with meeting creation, join URL generation, meeting end support, app-store metadata, API handlers, video adapter wiring, and platform location mappings.
Verification: