2023-01-04 22:14:46 +00:00
|
|
|
import { APP_NAME } from "@calcom/lib/constants";
|
|
|
|
|
2022-06-06 17:49:56 +00:00
|
|
|
import { renderEmail } from "../";
|
|
|
|
import OrganizerScheduledEmail from "./organizer-scheduled-email";
|
|
|
|
|
|
|
|
export default class OrganizerRescheduledEmail extends OrganizerScheduledEmail {
|
|
|
|
protected getNodeMailerPayload(): Record<string, unknown> {
|
2023-02-27 20:45:40 +00:00
|
|
|
const toAddresses = [this.teamMember?.email || this.calEvent.organizer.email];
|
2022-06-06 17:49:56 +00:00
|
|
|
|
|
|
|
return {
|
|
|
|
icalEvent: {
|
|
|
|
filename: "event.ics",
|
|
|
|
content: this.getiCalEventAsString(),
|
|
|
|
},
|
2023-01-04 22:14:46 +00:00
|
|
|
from: `${APP_NAME} <${this.getMailerOptions().from}>`,
|
2022-06-06 17:49:56 +00:00
|
|
|
to: toAddresses.join(","),
|
2023-09-22 10:14:04 +00:00
|
|
|
replyTo: [this.calEvent.organizer.email, ...this.calEvent.attendees.map(({ email }) => email)],
|
2022-09-15 01:27:46 +00:00
|
|
|
subject: `${this.calEvent.organizer.language.translate("event_type_has_been_rescheduled_on_time_date", {
|
2023-01-10 18:32:50 +00:00
|
|
|
title: this.calEvent.title,
|
2023-07-28 14:22:19 +00:00
|
|
|
date: this.getFormattedDate(),
|
2022-06-06 17:49:56 +00:00
|
|
|
})}`,
|
|
|
|
html: renderEmail("OrganizerRescheduledEmail", {
|
2023-03-14 04:19:05 +00:00
|
|
|
calEvent: { ...this.calEvent, attendeeSeatId: undefined },
|
2022-06-06 17:49:56 +00:00
|
|
|
attendee: this.calEvent.organizer,
|
|
|
|
}),
|
|
|
|
text: this.getTextBody("event_has_been_rescheduled"),
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|