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 <hariombalhara@gmail.com>

---------

Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
This commit is contained in:
Carina Wollendorfer
2023-04-21 11:46:23 +00:00
committed by GitHub
co-authored by Hariom Balhara CarinaWolli
parent 473b36a6be
commit 2fadba85f4
@@ -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({