On seats, hide attendees if option is selected (#6767)

* On seats, hide attendees if option is selected

* Remove unused line
This commit is contained in:
Joe Au-Yeung
2023-01-27 12:10:49 -07:00
committed by GitHub
parent 0faf294367
commit 60f7528cbc
2 changed files with 5 additions and 8 deletions
@@ -22,14 +22,6 @@ export default class AttendeeScheduledEmail extends BaseEmail {
this.attendee = attendee;
this.showAttendees = showAttendees;
this.t = attendee.language.translate;
if (!this.showAttendees) {
this.calEvent.attendees = [
{
...this.attendee,
},
];
}
}
protected getiCalEventAsString(): string | undefined {
@@ -620,6 +620,11 @@ async function handler(req: NextApiRequest & { userId?: number | undefined }) {
});
const newSeat = booking.attendees.length !== 0;
if (!evt.seatsShowAttendees) {
evt.attendees = invitee;
}
/**
* Remember objects are passed into functions as references
* so if you modify it in a inner function it will be modified in the outer function