MCPcopy
hub / github.com/calcom/cal.diy / getVideoCallUrlFromCalEvent

Function getVideoCallUrlFromCalEvent

packages/lib/CalEventParser.ts:627–646  ·  view source on GitHub ↗
(calEvent: {
  videoCallData?: { type?: string; url?: string };
  additionalInformation?: AdditionalInformation;
  location?: string | null;
  uid?: string | null;
})

Source from the content-addressed store, hash-verified

625};
626
627export const getVideoCallUrlFromCalEvent = (calEvent: {
628 videoCallData?: { type?: string; url?: string };
629 additionalInformation?: AdditionalInformation;
630 location?: string | null;
631 uid?: string | null;
632}): string => {
633 if (calEvent.videoCallData) {
634 if (calEvent.videoCallData.type === "daily_video") {
635 return getPublicVideoCallUrl(calEvent.uid);
636 }
637 return calEvent.videoCallData.url ?? "";
638 }
639 if (calEvent.additionalInformation?.hangoutLink) {
640 return calEvent.additionalInformation.hangoutLink;
641 }
642 if (calEvent.location?.startsWith("http")) {
643 return calEvent.location;
644 }
645 return "";
646};
647
648export const getVideoCallPassword = (videoCallData?: VideoCallData): string => {
649 return isDailyVideoCall(videoCallData) ? "" : (videoCallData?.password ?? "");

Callers 12

generateIcsStringFunction · 0.90
LocationInfoFunction · 0.90
handleConfirmationFunction · 0.90
handlerFunction · 0.90
handleWorkflowsUpdateFunction · 0.90
handlePaymentSuccessFunction · 0.90
getLocationFunction · 0.85

Calls 1

getPublicVideoCallUrlFunction · 0.85

Tested by

no test coverage detected