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: [email protected] <[email protected]> * 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: [email protected] <[email protected]> * 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: [email protected] <[email protected]> * Update attendeeRescheduleSeatedBooking.ts * revert --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
2 files changed
+3
-1
No files matched your search
@@ -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