fix: Rescheduling email when there is broken calendar integration (#15669)

This commit is contained in:
Hariom Balhara
2024-07-10 10:32:56 +01:00
committed by GitHub
parent aa20b9248a
commit ad61d48706
2 changed files with 6 additions and 4 deletions
@@ -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,
@@ -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,