Hotfix: guest are not added to the invite and emails (#7767)

Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
pull/7423/head^2
Nafees Nazik 2023-03-16 14:34:17 +05:30 committed by GitHub
parent c8554e6878
commit 84f7924215
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 11 deletions

View File

@ -692,18 +692,15 @@ async function handler(
const guests = (reqGuests || []).reduce((guestArray, guest) => {
// If it's a team event, remove the team member from guests
if (isTeamEventType) {
if (users.some((user) => user.email === guest)) {
return guestArray;
} else {
guestArray.push({
email: guest,
name: "",
timeZone: reqBody.timeZone,
language: { translate: tGuests, locale: "en" },
});
}
if (isTeamEventType && users.some((user) => user.email === guest)) {
return guestArray;
}
guestArray.push({
email: guest,
name: "",
timeZone: reqBody.timeZone,
language: { translate: tGuests, locale: "en" },
});
return guestArray;
}, [] as typeof invitee);