Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add BigBlueButton integration #10803

Closed
wants to merge 39 commits into from
Closed

Conversation

nicktrn
Copy link
Contributor

@nicktrn nicktrn commented Aug 16, 2023

What does this PR do?

As much a new integration as a POC for templated meeting links and redirects.

  1. New BBB app with credential validation
  2. On-demand meeting creation
  3. Redirect via Cal.com link /booking/<uid>/join/<hash>
  4. User-specific link generation (booking page and emails)

Todo:

  • get permission to use official logo
  • receive go-ahead for redirect pages
  • finalise description page
  • add remaining moderator types, e.g. team members

Fixes #1985
/claim #1985

Demo

bbb-install.webm
bbb-demo.webm

Type of change

  • New feature (non-breaking change which adds functionality)

How should this be tested?

Credentials for testing

endpoint: https://test-install.blindsidenetworks.com/bigbluebutton/api
secret: 8cd8ef52e8e101574e400365b55e11a6
hash: sha1

  1. Add the new integration
  2. Set it as the location for an event
  3. Make a booking
  4. Try meeting links for both organizer and attendee
  5. They should automatically join with different roles - organizer will be a moderator, able to control slides
  6. Should work with multiple guests, each sent a different link

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Checklist

  • I haven't added tests that prove my fix is effective or that my feature works

@vercel
Copy link

vercel bot commented Aug 16, 2023

@nicktrn is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Aug 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2023 5:55am

@github-actions github-actions bot added app-store area: app store, apps, calendar integrations, google calendar, outlook, lark, apple calendar Medium priority Created by Linear-GitHub Sync ✨ feature New feature or request 💎 Bounty A bounty on Algora.io 🙋🏻‍♂️help wanted Help from the community is appreciated labels Aug 16, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 16, 2023

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link to collect XP and win prizes!

@github-actions
Copy link
Contributor

github-actions bot commented Aug 16, 2023

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

New Pages Added

The following pages were added to the bundle from the code in this PR:

Page Size (compressed) First Load % of Budget (350 KB)
/booking/[uid]/join 299 B 156.05 KB 44.59%
/booking/[uid]/join/[hash] 305 B 156.06 KB 44.59%

type: appConfig.type,
id: event.uid,
password: "",
url: `${WEBAPP_URL}/booking/${event.uid}/join/{ATTENDEE_HASH}`,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a typo. This is a template. Links need to be unique per attendee so we can link their details to the respective BBB session. Otherwise the same session will be joined and other participants with the same link removed from the call.

For organizers, the Cal.com session details are used. Links without the hash will be sent and displayed.

import logger from "@calcom/lib/logger";

const xmlParser = new XMLParser({
ignoreDeclaration: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaner output for zod parsing.

});

const instance = axios.create({
timeout: 10_000,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got a timeout with 5s during dev, maybe slow test server, but best to be safe. Anything is better than no timeout by default.

],
});
instance.interceptors.request.use((config) => {
logger.debug(`[${config.method?.toUpperCase()}] ${config.url}`);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useful for debugging.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use a child logger here instead which has a prefix of BBB app. Would be useful in knowing where the log came from.

.object({
url: z.string().url(),
secret: z.string(),
hash: z.enum(["sha1", "sha256", "sha384", "sha512"]),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love to enforce sha512 here but this is up to the respective BBB server admins.

}
}

getSignedJoinMeetingUrl(meetingId: string, fullName: string, role: MeetingRole, redirect = true) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This returns a signed request, ready to be sent to the BBB server. The idea is for user clients to send this themselves. They will then get redirected to the meeting (after a session cookie is set in the response).

redirect: String(redirect),
role,
// disables cookie requirement - anyone can join with just the url we get in the reponse
allowRequestsWithoutSession: "true",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not currently used anywhere, but a good option to have if we ever want to redirect users directly and make the join request for them.

packages/app-store/bigbluebutton/static/icon.svg Outdated Show resolved Hide resolved
@@ -20,7 +20,7 @@ export const BaseScheduledEmail = (
calEvent: CalendarEvent;
attendee: Person;
timeZone: string;
includeAppsStatus?: boolean;
isOrganizer?: boolean;
Copy link
Contributor Author

@nicktrn nicktrn Aug 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

App status is only included for organizers. Seemed unnecessary to add another prop.

edit: Thought of renaming as also includes team members, but this is only set to true for "Organizer" emails.

packages/app-store/bigbluebutton/config.json Outdated Show resolved Hide resolved
@ffdixon
Copy link

ffdixon commented Jan 22, 2024

This is Fred Dixon, Product Manager for BigBlueButton and Co-founder of BigBlueButton Inc.

Let us know if there is any assistance we can provide.

Regards,... Fred

@nicktrn
Copy link
Contributor Author

nicktrn commented Jan 24, 2024

Thanks @ffdixon! I think everything is fine from the BigBlueButton side. The holdup here was mainly re Cal.com internals and integration security.

@hariombalhara's review comments from #10803 (comment) and my reply with some ideas #10803 (comment) still hold.

Sadly, I don't currently have time to carry on, but this could easily be taken up by a keen contributor.

@abeatbeyondlab
Copy link

abeatbeyondlab commented Feb 8, 2024

hello guys it would be really appreciated if this work continue. having big blue button in cal.com is amazing

@keithwillcode keithwillcode modified the milestones: v3.9, v3.8 Feb 9, 2024
@giteshsarvaiya
Copy link

giteshsarvaiya commented Feb 16, 2024

Hello guys, I would like to work on this issue, should I start building asap or is there something which I should beforehand ?

@keithwillcode
Copy link
Contributor

@giteshsarvaiya feel free to pick up where @nicktrn left off 🙏🏼

@dosubot dosubot bot modified the milestones: v3.8, v4.1 Apr 3, 2024
@dosubot dosubot bot added this to the v4.2 milestone Apr 16, 2024
@dosubot dosubot bot modified the milestones: v4.2, v4.1 May 9, 2024
@dosubot dosubot bot modified the milestones: v4.2, v4.3, v4.4 Jun 3, 2024
@dosubot dosubot bot modified the milestones: v4.4, v4.5 Aug 19, 2024
@dosubot dosubot bot modified the milestones: v4.5, v4.6 Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app-store area: app store, apps, calendar integrations, google calendar, outlook, lark, apple calendar 💎 Bounty A bounty on Algora.io community Created by Linear-GitHub Sync ✨ feature New feature or request 🙋🏻‍♂️help wanted Help from the community is appreciated Medium priority Created by Linear-GitHub Sync 🚨 merge conflict This PR has a merge conflict that has to be addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-3105] BigBlueButton Integration