Merge branch 'main' into fix/2570-adds-saturday-first-day

fix/2570-adds-saturday-first-day
kodiakhq[bot] 2022-04-26 13:48:53 +00:00 committed by GitHub
commit a7e90f8942
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 4 deletions

View File

@ -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) {