From eaff9e8c8904e131de53b128d24afd481ada201b Mon Sep 17 00:00:00 2001 From: Morgan <33722304+ThyMinimalDev@users.noreply.github.com> Date: Wed, 4 Dec 2024 14:33:53 +0200 Subject: [PATCH] fix: disable mandatory reminder for platform (#17998) * fix: disable mandatory reminder for platform * bump libraries version * fixup! bump libraries version --- apps/api/v2/package.json | 2 +- packages/features/bookings/lib/handleConfirmation.ts | 3 ++- packages/features/bookings/lib/handleNewBooking.ts | 3 ++- .../ee/workflows/lib/reminders/scheduleMandatoryReminder.ts | 4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/api/v2/package.json b/apps/api/v2/package.json index 0b3762b8d2..d5e7c0d439 100644 --- a/apps/api/v2/package.json +++ b/apps/api/v2/package.json @@ -29,7 +29,7 @@ "@axiomhq/winston": "^1.2.0", "@calcom/platform-constants": "*", "@calcom/platform-enums": "*", - "@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.67", + "@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.69", "@calcom/platform-libraries-0.0.2": "npm:@calcom/platform-libraries@0.0.2", "@calcom/platform-types": "*", "@calcom/platform-utils": "*", diff --git a/packages/features/bookings/lib/handleConfirmation.ts b/packages/features/bookings/lib/handleConfirmation.ts index cfab24bb5a..2f28d265f9 100644 --- a/packages/features/bookings/lib/handleConfirmation.ts +++ b/packages/features/bookings/lib/handleConfirmation.ts @@ -343,7 +343,8 @@ export async function handleConfirmation(args: { workflows, false, !!updatedBookings[index].eventType?.owner?.hideBranding, - evt.attendeeSeatId + evt.attendeeSeatId, + !emailsEnabled && Boolean(platformClientParams?.platformClientId) ); } diff --git a/packages/features/bookings/lib/handleNewBooking.ts b/packages/features/bookings/lib/handleNewBooking.ts index 58920c58a8..13dca85e4a 100644 --- a/packages/features/bookings/lib/handleNewBooking.ts +++ b/packages/features/bookings/lib/handleNewBooking.ts @@ -1888,7 +1888,8 @@ async function handler( workflows, !isConfirmedByDefault, !!eventType.owner?.hideBranding, - evt.attendeeSeatId + evt.attendeeSeatId, + noEmail && Boolean(platformClientId) ); } diff --git a/packages/features/ee/workflows/lib/reminders/scheduleMandatoryReminder.ts b/packages/features/ee/workflows/lib/reminders/scheduleMandatoryReminder.ts index d8f2325720..06d6aa0944 100644 --- a/packages/features/ee/workflows/lib/reminders/scheduleMandatoryReminder.ts +++ b/packages/features/ee/workflows/lib/reminders/scheduleMandatoryReminder.ts @@ -16,8 +16,10 @@ export async function scheduleMandatoryReminder( workflows: Workflow[], requiresConfirmation: boolean, hideBranding: boolean, - seatReferenceUid: string | undefined + seatReferenceUid: string | undefined, + isPlatformNoEmail = false ) { + if (isPlatformNoEmail) return; try { const hasExistingWorkflow = workflows.some((workflow) => { return (