fix: hide cal branding on platform workflows (#27385)

* fix: hide cal branding on platform workflows

* refactor: rely on existing with platform variables code

* revert: comment

* fix e2e

* chore: remove unit results
This commit is contained in:
Lauris Skraucis authored and GitHub committed 2026-02-09 13:46:52 -03:00
1 parent f66fffd13b
commit edf9cd70dd
9 files changed
+90 -32

No files matched your search

@@ -49,14 +49,17 @@ export async function sendWorkflowEmails(payload: string): Promise<void> {
throw new Error("Booking not found");
}
const calendarEvent = (await CalendarEventBuilder.fromBooking(booking, {})).build();
const bookingMetadata = bookingMetadataSchema.parse(booking.metadata || {});
const calendarEvent = (await CalendarEventBuilder.fromBooking(booking, {
platformClientId: bookingMetadata?.platformClientId,
})).build();
if (!calendarEvent) {
throw new Error("Calendar event could not be built");
}
// Check if videoCallUrl exists in booking metadata and add it to evt.metadata
const bookingMetadata = bookingMetadataSchema.parse(booking.metadata || {});
const metadata = bookingMetadata?.videoCallUrl
? {
videoCallUrl: bookingMetadata.videoCallUrl,