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

This commit is contained in:
Somay Chauhan 2023-11-20 18:58:40 +05:30 committed by zomars
parent 80fb612898
commit 7006f0bf25

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);
};