Scheduling infrastructure for absolutely everyone.
fix: jitsi email does not contain meeting link (#2004)
Krunal Shahc437f15868c2
diff --git a/apps/web/components/booking/pages/BookingPage.tsx b/apps/web/components/booking/pages/BookingPage.tsxindex 9c6ff947959..49ccb7e49d5 100644--- a/apps/web/components/booking/pages/BookingPage.tsx+++ b/apps/web/components/booking/pages/BookingPage.tsx@@ -85,9 +85,6 @@ const BookingPage = (props: BookingPageProps) => {if (!location) {return;}- if (location === "integrations:jitsi") {- return "https://meet.jit.si/cal/" + uuidv4();- }if (location.includes("integration")) {return t("web_conferencing_details_to_follow");}diff --git a/apps/web/lib/events/EventManager.ts b/apps/web/lib/events/EventManager.tsindex e318b217f10..0f27e35d9fb 100644--- a/apps/web/lib/events/EventManager.ts+++ b/apps/web/lib/events/EventManager.ts@@ -5,6 +5,7 @@ import { v5 as uuidv5 } from "uuid";import { FAKE_DAILY_CREDENTIAL } from "@lib/integrations/Daily/DailyVideoApiAdapter";import { FAKE_HUDDLE_CREDENTIAL } from "@lib/integrations/Huddle01/Huddle01VideoApiAdapter";+import { FAKE_JITSI_CREDENTIAL } from "@lib/integrations/Jitsi/JitsiVideoApiAdapter";import { createEvent, updateEvent } from "@lib/integrations/calendar/CalendarManager";import { AdditionInformation, CalendarEvent } from "@lib/integrations/calendar/interfaces/Calendar";import { LocationType } from "@lib/location";@@ -57,8 +58,14 @@ export const isTandem = (location: string): boolean => {return location === "integrations:tandem";};+export const isJitsi = (location: string): boolean => {+ return location === "integrations:jitsi";+};+export const isDedicatedIntegration = (location: string): boolean => {- return isZoom(location) || isDaily(location) || isHuddle01(location) || isTandem(location);+ return (+ isZoom(location) || isDaily(location) || isHuddle01(location) || isTandem(location) || isJitsi(location)+ );};export const getLocationRequestFromIntegration = (location: string) => {@@ -121,6 +128,7 @@ export default class EventManager {this.videoCredentials.push(FAKE_DAILY_CREDENTIAL);}this.videoCredentials.push(FAKE_HUDDLE_CREDENTIAL);+ this.videoCredentials.push(FAKE_JITSI_CREDENTIAL);}/**diff --git a/apps/web/lib/integrations/Jitsi/JitsiVideoApiAdapter.ts b/apps/web/lib/integrations/Jitsi/JitsiVideoApiAdapter.tsindex 92f7c2f9f24..f27b4af4920 100644--- a/apps/web/lib/integrations/Jitsi/JitsiVideoApiAdapter.ts+++ b/apps/web/lib/integrations/Jitsi/JitsiVideoApiAdapter.ts@@ -1,8 +1,17 @@+import { Credential } from "@prisma/client";import { v4 as uuidv4 } from "uuid";import { PartialReference } from "@lib/events/EventManager";+import { randomString } from "@lib/random";import { VideoApiAdapter, VideoCallData } from "@lib/videoClient";+export const FAKE_JITSI_CREDENTIAL: Credential = {+ id: +new Date().getTime(),+ type: "jitsi_video",+ key: { apikey: randomString(12) },+ userId: +new Date().getTime(),+};+const JitsiVideoApiAdapter = (): VideoApiAdapter => {return {getAvailability: () => {