From 2fadba85f454b4222efb716103c15fca0d0c03af Mon Sep 17 00:00:00 2001 From: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Date: Fri, 21 Apr 2023 13:46:23 +0200 Subject: [PATCH] Fix workflow not firing for event types without video app as location (#8435) * fix error when videoCallUrl was null * make sure videocallurl is not null * Revert "fix error when videoCallUrl was null" This reverts commit f23776ec8be1be334245b7e3f8a977f7e73591f1. * Update packages/features/bookings/lib/handleNewBooking.ts Co-authored-by: Hariom Balhara --------- Co-authored-by: CarinaWolli Co-authored-by: Hariom Balhara --- packages/features/bookings/lib/handleNewBooking.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/features/bookings/lib/handleNewBooking.ts b/packages/features/bookings/lib/handleNewBooking.ts index 5b2c33c566..6449e4f6b5 100644 --- a/packages/features/bookings/lib/handleNewBooking.ts +++ b/packages/features/bookings/lib/handleNewBooking.ts @@ -1503,7 +1503,7 @@ async function handler( // Here we should handle every after action that needs to be done after booking creation // Obtain event metadata that includes videoCallUrl - const metadata = { videoCallUrl: evt.videoCallData?.url }; + const metadata = evt.videoCallData?.url ? { videoCallUrl: evt.videoCallData.url } : undefined; try { await scheduleWorkflowReminders({ workflows: eventType.workflows, @@ -2119,7 +2119,7 @@ async function handler( log.error("Error while creating booking references", error); } - const metadataFromEvent = { videoCallUrl }; + const metadataFromEvent = videoCallUrl ? { videoCallUrl } : undefined; try { await scheduleWorkflowReminders({