fix: fix: Incorrect Attendee Shown When Cancelling a Seated Event (#19647)

This commit is contained in:
Anik Dhabal Babu
2025-03-03 05:05:36 +00:00
committed by GitHub
parent 51a39571aa
commit 22f1060ed6
3 changed files with 12 additions and 3 deletions
+7 -1
View File
@@ -355,7 +355,13 @@ export const sendCancelledSeatEmailsAndSMS = async (
emailsToSend.push(sendEmail(() => new AttendeeCancelledSeatEmail(clonedCalEvent, cancelledAttendee)));
if (!eventTypeDisableHostEmail(eventTypeMetadata))
emailsToSend.push(
sendEmail(() => new OrganizerAttendeeCancelledSeatEmail({ calEvent: formattedCalEvent }))
sendEmail(
() =>
new OrganizerAttendeeCancelledSeatEmail({
calEvent: formattedCalEvent,
attendee: cancelledAttendee,
})
)
);
await Promise.all(emailsToSend);
@@ -23,7 +23,7 @@ export default class OrganizerCancelledEmail extends OrganizerScheduledEmail {
date: this.getFormattedDate(),
})}`,
html: await renderEmail("OrganizerAttendeeCancelledSeatEmail", {
attendee: this.calEvent.organizer,
attendee: this.attendee || this.calEvent.organizer,
calEvent: this.calEvent,
}),
text: this.getTextBody("event_request_cancelled"),
@@ -19,12 +19,14 @@ export default class OrganizerScheduledEmail extends BaseEmail {
newSeat?: boolean;
teamMember?: Person;
reassigned?: Reassigned;
attendee?: Person;
constructor(input: {
calEvent: CalendarEvent;
newSeat?: boolean;
teamMember?: Person;
reassigned?: Reassigned;
attendee?: Person;
}) {
super();
this.name = "SEND_BOOKING_CONFIRMATION";
@@ -33,6 +35,7 @@ export default class OrganizerScheduledEmail extends BaseEmail {
this.newSeat = input.newSeat;
this.teamMember = input.teamMember;
this.reassigned = input.reassigned;
this.attendee = input.attendee;
}
protected async getNodeMailerPayload(): Promise<Record<string, unknown>> {
@@ -51,7 +54,7 @@ export default class OrganizerScheduledEmail extends BaseEmail {
subject: `${this.newSeat ? `${this.t("new_attendee")}: ` : ""}${this.calEvent.title}`,
html: await this.getHtml(
clonedCalEvent,
this.calEvent.organizer,
this.attendee || this.calEvent.organizer,
this.teamMember,
this.newSeat,
this.reassigned