fix: ensure seated event reschedules send proper reschedule emails (#22849)
* fix: ensure seated event reschedules send proper reschedule emails - Fix attendee reschedule bypass when no existing booking at new time slot - Remove restrictive isConfirmedByDefault conditions from owner reschedule functions - Add seatedRescheduleEmailSent flag to coordinate email sending between handleSeats and handleNewBooking - Prevent main flow from overriding seated reschedule emails with scheduled emails Fixes issue where both organizer and attendee receive schedule emails instead of reschedule emails during seated event reschedules. Co-Authored-By: anik@cal.com <adhabal2002@gmail.com> * refine: only apply seatedRescheduleEmailSent check for seated bookings - Add eventType.seatsPerTimeSlot condition to ensure flag only affects seated events - Prevents interference with regular booking email flow Co-Authored-By: anik@cal.com <adhabal2002@gmail.com> * fix: replace unreliable flag mechanism with direct seated reschedule detection - Remove seatedRescheduleEmailSent flag from HandleSeatsResultBooking type - Remove flag assignments from seated reschedule functions - Use direct detection (eventType.seatsPerTimeSlot && rescheduleUid) in handleNewBooking - Maintain email sending fixes for attendee reschedules and owner reschedule conditions - Resolve TypeScript type mismatch issues with type-safe approach Co-Authored-By: anik@cal.com <adhabal2002@gmail.com> * Update attendeeRescheduleSeatedBooking.ts * revert --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
anik@cal.com
Devin AI
parent
c20e723e34
commit
76b68bebd7
@@ -1990,7 +1990,7 @@ async function handler(
|
||||
})
|
||||
);
|
||||
|
||||
if (!isDryRun) {
|
||||
if (!isDryRun && !(eventType.seatsPerTimeSlot && rescheduleUid)) {
|
||||
await sendScheduledEmailsAndSMS(
|
||||
{
|
||||
...evt,
|
||||
|
||||
+2
@@ -51,6 +51,8 @@ const attendeeRescheduleSeatedBooking = async (
|
||||
// We don't want to trigger rescheduling logic of the original booking
|
||||
originalRescheduledBooking = null;
|
||||
|
||||
await sendRescheduledSeatEmailAndSMS(evt, seatAttendee as Person, eventType.metadata);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user