Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix - Email Notes #2356

Merged
merged 4 commits into from Apr 3, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion apps/web/pages/api/book/event.ts
Expand Up @@ -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
Expand Down Expand Up @@ -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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note at this point it has already been created in prisma with the right values

// to the default description when we are sending the emails.
evt.description = description;

results = updateManager.results;
referencesToCreate = updateManager.referencesToCreate;
Expand Down Expand Up @@ -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;

Expand Down