From 397f6eba01a503556549d2a68ebf47b87a7284a9 Mon Sep 17 00:00:00 2001 From: Joe Au-Yeung Date: Mon, 30 Oct 2023 16:33:11 -0400 Subject: [PATCH] Use `generateIcsString` for rescheduled emails --- packages/emails/templates/attendee-rescheduled-email.ts | 3 ++- packages/emails/templates/organizer-rescheduled-email.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/emails/templates/attendee-rescheduled-email.ts b/packages/emails/templates/attendee-rescheduled-email.ts index 0c7e183335..dca0032eda 100644 --- a/packages/emails/templates/attendee-rescheduled-email.ts +++ b/packages/emails/templates/attendee-rescheduled-email.ts @@ -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}>`, diff --git a/packages/emails/templates/organizer-rescheduled-email.ts b/packages/emails/templates/organizer-rescheduled-email.ts index 26da823a1e..11c50073f7 100644 --- a/packages/emails/templates/organizer-rescheduled-email.ts +++ b/packages/emails/templates/organizer-rescheduled-email.ts @@ -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(","),