From 7d3f070e27bdf754ba5f298984259928f21e0a64 Mon Sep 17 00:00:00 2001 From: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Date: Tue, 26 Apr 2022 14:46:20 +0100 Subject: [PATCH] Bug/email notes hidden (#2611) * Fix Width * Fixes email notes * Fixing reschedule email Co-authored-by: Peer Richelsen Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- apps/web/pages/api/book/event.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/apps/web/pages/api/book/event.ts b/apps/web/pages/api/book/event.ts index 8c8ef7d7..591b9b74 100644 --- a/apps/web/pages/api/book/event.ts +++ b/apps/web/pages/api/book/event.ts @@ -673,7 +673,11 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) } } - await sendRescheduledEmails({ ...evt, additionInformation: metadata }); + await sendRescheduledEmails({ + ...evt, + additionInformation: metadata, + additionalNotes, // Resets back to the addtionalNote input and not the overriden value + }); } // If it's not a reschedule, doesn't require confirmation and there's no price, // Create a booking @@ -703,13 +707,17 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) metadata.conferenceData = results[0].createdEvent?.conferenceData; metadata.entryPoints = results[0].createdEvent?.entryPoints; } - await sendScheduledEmails({ ...evt, additionInformation: metadata }); + await sendScheduledEmails({ + ...evt, + additionInformation: metadata, + additionalNotes, + }); } } if (eventType.requiresConfirmation && !rescheduleUid) { - await sendOrganizerRequestEmail(evt); - await sendAttendeeRequestEmail(evt, attendeesList[0]); + await sendOrganizerRequestEmail({ ...evt, additionalNotes }); + await sendAttendeeRequestEmail({ ...evt, additionalNotes }, attendeesList[0]); } if (typeof eventType.price === "number" && eventType.price > 0 && !originalRescheduledBooking?.paid) {