Scheduling infrastructure for absolutely everyone.
fix: rescheduling in require confirmation (#11152)
Udit Takkar7143923ea451
diff --git a/packages/features/bookings/lib/handleNewBooking.ts b/packages/features/bookings/lib/handleNewBooking.tsindex 74c92e46ec9..0dbd8f40217 100644--- a/packages/features/bookings/lib/handleNewBooking.ts+++ b/packages/features/bookings/lib/handleNewBooking.ts@@ -1374,7 +1374,7 @@ async function handler(}}- if (noEmail !== true) {+ if (noEmail !== true && (!requiresConfirmation || isOrganizerRescheduling)) {const copyEvent = cloneDeep(evt);await sendRescheduledEmails({...copyEvent,@@ -1494,12 +1494,14 @@ async function handler(? calendarResult?.updatedEvent[0]?.iCalUID: calendarResult?.updatedEvent?.iCalUID || undefined;- // TODO send reschedule emails to attendees of the old booking- await sendRescheduledEmails({- ...copyEvent,- additionalNotes, // Resets back to the additionalNote input and not the override value- cancellationReason: "$RCH$" + (rescheduleReason ? rescheduleReason : ""), // Removable code prefix to differentiate cancellation from rescheduling for email- });+ if (!requiresConfirmation || isOrganizerRescheduling) {+ // TODO send reschedule emails to attendees of the old booking+ await sendRescheduledEmails({+ ...copyEvent,+ additionalNotes, // Resets back to the additionalNote input and not the override value+ cancellationReason: "$RCH$" + (rescheduleReason ? rescheduleReason : ""), // Removable code prefix to differentiate cancellation from rescheduling for email+ });+ }// Update the old booking with the cancelled statusawait prisma.booking.update({@@ -2097,7 +2099,7 @@ async function handler(videoCallUrl = metadata.hangoutLink || videoCallUrl || updatedEvent?.url;}}- if (noEmail !== true) {+ if (noEmail !== true && (!requiresConfirmation || isOrganizerRescheduling)) {const copyEvent = cloneDeep(evt);await sendRescheduledEmails({...copyEvent,