From 6c1aa1a0ac4b1824e07f74128e5ab5a6b5e02f59 Mon Sep 17 00:00:00 2001 From: Joe Au-Yeung Date: Tue, 31 Oct 2023 14:16:16 -0400 Subject: [PATCH] Add ICAL_UID_DOMAIN to .env --- .env.example | 2 ++ packages/features/bookings/lib/handleNewBooking.ts | 2 +- turbo.json | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 520ce80b27..2458517900 100644 --- a/.env.example +++ b/.env.example @@ -257,3 +257,5 @@ E2E_TEST_OIDC_USER_EMAIL= E2E_TEST_OIDC_USER_PASSWORD= # *********************************************************************************************************** + +ICAL_UID_DOMAIN="cal.com" \ No newline at end of file diff --git a/packages/features/bookings/lib/handleNewBooking.ts b/packages/features/bookings/lib/handleNewBooking.ts index 2b70558d81..a9c1767dfb 100644 --- a/packages/features/bookings/lib/handleNewBooking.ts +++ b/packages/features/bookings/lib/handleNewBooking.ts @@ -1099,7 +1099,7 @@ async function handler( const calEventUserFieldsResponses = "calEventUserFieldsResponses" in reqBody ? reqBody.calEventUserFieldsResponses : null; - const iCalUID = originalRescheduledBooking?.iCalUID ?? `${uid}@cal.com`; + const iCalUID = originalRescheduledBooking?.iCalUID ?? `${uid}@${process.env.ICAL_UID_DOMAIN}`; // For bookings made before introducing iCalSequence, assume that the sequence should start at 1. For new bookings start at 0. const iCalSequence = originalRescheduledBooking?.iCalSequence ? originalRescheduledBooking.iCalSequence + 1 diff --git a/turbo.json b/turbo.json index 849d70f2fe..38dd22ab8d 100644 --- a/turbo.json +++ b/turbo.json @@ -239,6 +239,7 @@ "HEROKU_APP_NAME", "HUBSPOT_CLIENT_ID", "HUBSPOT_CLIENT_SECRET", + "ICAL_UID_DOMAIN", "INTEGRATION_TEST_MODE", "INTERCOM_SECRET", "INTERCOM_SECRET",