chore: Set daily video testing meeting link to env var (#20359)
This commit is contained in:
@@ -404,6 +404,10 @@ CAL_VIDEO_BUCKET_NAME=
|
||||
CAL_VIDEO_BUCKET_REGION=
|
||||
CAL_VIDEO_ASSUME_ROLE_ARN=
|
||||
|
||||
# For local testing of Daily Video
|
||||
# Set this to the link of a working Daily Video meeting link
|
||||
CAL_VIDEO_MEETING_LINK_FOR_TESTING=
|
||||
|
||||
# Used to use Replexica SDK, a tool for real-time AI-powered localization
|
||||
REPLEXICA_API_KEY=
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
} from "@calcom/app-store/dailyvideo/lib/VideoApiAdapter";
|
||||
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
|
||||
import { getCalVideoReference } from "@calcom/features/get-cal-video-reference";
|
||||
import { CAL_VIDEO_MEETING_LINK_FOR_TESTING } from "@calcom/lib/constants";
|
||||
import { isENVDev } from "@calcom/lib/env";
|
||||
import { BookingRepository } from "@calcom/lib/server/repository/booking";
|
||||
import { OrganizationRepository } from "@calcom/lib/server/repository/organization";
|
||||
@@ -29,9 +30,9 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
|
||||
|
||||
// Below if block is for local testing purposes only
|
||||
// STARTS------------------------------------------------------------------------------
|
||||
if (booking?.references[0] && isENVDev) {
|
||||
if (booking?.references[0] && isENVDev && CAL_VIDEO_MEETING_LINK_FOR_TESTING) {
|
||||
// meetingUrl is `null` in dev env, so setting a dummy meetingUrl (it's a past but real meeting link in production env)
|
||||
booking.references[0].meetingUrl = "https://app.cal.com/video/wvsSuNC8r9ZScPhA6JKpiL";
|
||||
booking.references[0].meetingUrl = CAL_VIDEO_MEETING_LINK_FOR_TESTING;
|
||||
}
|
||||
// ENDS--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -210,3 +210,4 @@ export const DIRECTORY_IDS_TO_LOG = process.env.DIRECTORY_IDS_TO_LOG?.split(",")
|
||||
|
||||
export const IS_PLAIN_CHAT_ENABLED =
|
||||
!!process.env.NEXT_PUBLIC_PLAIN_CHAT_ID && process.env.NEXT_PUBLIC_PLAIN_CHAT_ID !== "";
|
||||
export const CAL_VIDEO_MEETING_LINK_FOR_TESTING = process.env.CAL_VIDEO_MEETING_LINK_FOR_TESTING;
|
||||
|
||||
@@ -457,6 +457,7 @@
|
||||
"CAL_VIDEO_BUCKET_NAME",
|
||||
"CAL_VIDEO_BUCKET_REGION",
|
||||
"CAL_VIDEO_ASSUME_ROLE_ARN",
|
||||
"CAL_VIDEO_MEETING_LINK_FOR_TESTING",
|
||||
"NEXT_PUBLIC_POSTHOG_KEY",
|
||||
"NEXT_PUBLIC_POSTHOG_HOST",
|
||||
"VAPID_PRIVATE_KEY",
|
||||
|
||||
Reference in New Issue
Block a user