diff --git a/packages/emails/templates/attendee-was-requested-to-reschedule-email.ts b/packages/emails/templates/attendee-was-requested-to-reschedule-email.ts index 184cbf4065..f725f9f94f 100644 --- a/packages/emails/templates/attendee-was-requested-to-reschedule-email.ts +++ b/packages/emails/templates/attendee-was-requested-to-reschedule-email.ts @@ -23,6 +23,7 @@ export default class AttendeeWasRequestedToRescheduleEmail extends OrganizerSche icalEvent: { filename: "event.ics", content: this.getiCalEventAsString(), + method: "request", }, from: `${APP_NAME} <${this.getMailerOptions().from}>`, to: toAddresses.join(","), @@ -42,6 +43,8 @@ export default class AttendeeWasRequestedToRescheduleEmail extends OrganizerSche // @OVERRIDE protected getiCalEventAsString(): string | undefined { const icsEvent = createEvent({ + uid: this.calEvent.iCalUID || this.calEvent.uid!, + sequence: 100, start: dayjs(this.calEvent.startTime) .utc() .toArray() @@ -61,7 +64,7 @@ export default class AttendeeWasRequestedToRescheduleEmail extends OrganizerSche email: attendee.email, })), status: "CANCELLED", - method: "CANCEL", + method: "REQUEST", }); if (icsEvent.error) { throw icsEvent.error; diff --git a/packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts b/packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts index ca282c9d4c..35f162b5cc 100644 --- a/packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts +++ b/packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts @@ -62,6 +62,7 @@ export const requestRescheduleHandler = async ({ ctx, input }: RequestReschedule scheduledJobs: true, workflowReminders: true, responses: true, + iCalUID: true, }, where: { uid: bookingId, @@ -176,6 +177,7 @@ export const requestRescheduleHandler = async ({ ctx, input }: RequestReschedule tAttendees ), organizer: userAsPeopleType, + iCalUID: bookingToReschedule.iCalUID, }); const director = new CalendarEventDirector(); @@ -246,6 +248,7 @@ export const requestRescheduleHandler = async ({ ctx, input }: RequestReschedule ? [bookingToReschedule?.destinationCalendar] : [], cancellationReason: `Please reschedule. ${cancellationReason}`, // TODO::Add i18-next for this + iCalUID: bookingToReschedule?.iCalUID, }; // Send webhook