Use `generateIcsString` for rescheduled emails

refactor/generate-ics-event
Joe Au-Yeung 2023-10-30 16:33:11 -04:00
parent 006b9fc4e2
commit 397f6eba01
2 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,5 @@
import { renderEmail } from "../";
import generateIcsString from "../lib/generateIcsString";
import AttendeeScheduledEmail from "./attendee-scheduled-email";
export default class AttendeeRescheduledEmail extends AttendeeScheduledEmail {
@ -6,7 +7,7 @@ export default class AttendeeRescheduledEmail extends AttendeeScheduledEmail {
return {
icalEvent: {
filename: "event.ics",
content: this.getiCalEventAsString(),
content: generateIcsString({ event: this.calEvent, t: this.t, role: "attendee" }),
},
to: `${this.attendee.name} <${this.attendee.email}>`,
from: `${this.calEvent.organizer.name} <${this.getMailerOptions().from}>`,

View File

@ -1,6 +1,7 @@
import { APP_NAME } from "@calcom/lib/constants";
import { renderEmail } from "../";
import generateIcsString from "../lib/generateIcsString";
import OrganizerScheduledEmail from "./organizer-scheduled-email";
export default class OrganizerRescheduledEmail extends OrganizerScheduledEmail {
@ -10,7 +11,7 @@ export default class OrganizerRescheduledEmail extends OrganizerScheduledEmail {
return {
icalEvent: {
filename: "event.ics",
content: this.getiCalEventAsString(),
content: generateIcsString({ event: this.calEvent, t: this.t, role: "organizer" }),
},
from: `${APP_NAME} <${this.getMailerOptions().from}>`,
to: toAddresses.join(","),