Fix - Email Notes (#2356)

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Omar López <[email protected]>
This commit is contained in:
authored and GitHub committed 2022-04-03 11:59:40 -06:00
1 parent 9948f9d854
commit 95aa5fe308
1 file changed
+7 -1
+7 -1
View File
@@ -326,7 +326,6 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
(str, input) => str + "<br /><br />" + input.label + ":<br />" + input.value,
""
);
const evt: CalendarEvent = {
type: eventType.title,
title: getEventName(eventNameObject), //this needs to be either forced in english, or fetched for each attendee and organizer separately
@@ -530,6 +529,9 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
if (rescheduleUid) {
// Use EventManager to conditionally use all needed integrations.
const updateManager = await eventManager.update(evt, rescheduleUid);
// This gets overridden when updating the event - to check if notes have been hidden or not. We just reset this back
// to the default description when we are sending the emails.
evt.description = description;
results = updateManager.results;
referencesToCreate = updateManager.referencesToCreate;
@@ -564,6 +566,10 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
// Use EventManager to conditionally use all needed integrations.
const createManager = await eventManager.create(evt);
// This gets overridden when creating the event - to check if notes have been hidden or not. We just reset this back
// to the default description when we are sending the emails.
evt.description = description;
results = createManager.results;
referencesToCreate = createManager.referencesToCreate;