fix: don't send notes to booker if "Hide notes in calendar" is on (#12333)

This commit is contained in:
Somay Chauhan authored and GitHub committed 2023-11-20 13:28:40 +00:00
1 parent 8e7785ca64
commit 3de7b73f5f
1 file changed
+14 -1
+14 -1
View File
@@ -87,6 +87,7 @@ export const sendScheduledEmails = async (
new AttendeeScheduledEmail(
{
...calEvent,
...(calEvent.hideCalendarNotes && { additionalNotes: undefined }),
...(eventNameObject && {
title: getEventName({ ...eventNameObject, t: attendee.language.translate }),
}),
@@ -152,7 +153,19 @@ export const sendScheduledSeatsEmails = async (
}
if (!attendeeEmailDisabled) {
emailsToSend.push(sendEmail(() => new AttendeeScheduledEmail(calEvent, invitee, showAttendees)));
emailsToSend.push(
sendEmail(
() =>
new AttendeeScheduledEmail(
{
...calEvent,
...(calEvent.hideCalendarNotes && { additionalNotes: undefined }),
},
invitee,
showAttendees
)
)
);
}
await Promise.all(emailsToSend);
};