From ad61d48706d9a8c548dfe9cd849a36552d3802c2 Mon Sep 17 00:00:00 2001 From: Hariom Balhara Date: Wed, 10 Jul 2024 15:02:56 +0530 Subject: [PATCH] fix: Rescheduling email when there is broken calendar integration (#15669) --- packages/features/bookings/lib/handleNewBooking.ts | 3 +-- .../bookings/lib/handleNewBooking/test/reschedule.test.ts | 7 +++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/features/bookings/lib/handleNewBooking.ts b/packages/features/bookings/lib/handleNewBooking.ts index b17e66745d..6888de8adb 100644 --- a/packages/features/bookings/lib/handleNewBooking.ts +++ b/packages/features/bookings/lib/handleNewBooking.ts @@ -1268,8 +1268,7 @@ async function handler( evt.appsStatus = handleAppsStatus(results, booking, reqAppsStatus); - // If there is an integration error, we don't send successful rescheduling email, instead broken integration email should be sent that are handled by either CalendarManager or videoClient - if (noEmail !== true && isConfirmedByDefault && !isThereAnIntegrationError) { + if (noEmail !== true && isConfirmedByDefault) { const copyEvent = cloneDeep(evt); const copyEventAdditionalInfo = { ...copyEvent, diff --git a/packages/features/bookings/lib/handleNewBooking/test/reschedule.test.ts b/packages/features/bookings/lib/handleNewBooking/test/reschedule.test.ts index 080d42d7de..6575e11f87 100644 --- a/packages/features/bookings/lib/handleNewBooking/test/reschedule.test.ts +++ b/packages/features/bookings/lib/handleNewBooking/test/reschedule.test.ts @@ -660,8 +660,11 @@ describe("handleNewBooking", () => { expectWorkflowToBeTriggered({ emailsToReceive: [organizer.email], emails }); - // FIXME: We should send Broken Integration emails on calendar event updation failure - // expectBrokenIntegrationEmails({ booker, organizer, emails }); + expectSuccessfulBookingRescheduledEmails({ + booker, + organizer, + emails, + }); expectBookingRescheduledWebhookToHaveBeenFired({ booker,