fix/google-calendar-removes-attendees-when-seats-5336 (#5366)
* Adding missing code that copied booking attendees to event attendees * Clean up code * Fix types * Fix types * Doing deep clone for sending seats email
This commit is contained in:
1 parent
7517feb62a
commit
dff08dc5b9
9 files changed
+57
-30
No files matched your search
@@ -160,6 +160,10 @@ export default class GoogleCalendarService implements Calendar {
|
||||
async updateEvent(uid: string, event: CalendarEvent, externalCalendarId: string): Promise<any> {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
const myGoogleAuth = await this.auth.getToken();
|
||||
const eventAttendees = event.attendees.map(({ id, ...rest }) => ({
|
||||
...rest,
|
||||
responseStatus: "accepted",
|
||||
}));
|
||||
const payload: calendar_v3.Schema$Event = {
|
||||
summary: event.title,
|
||||
description: getRichDescription(event),
|
||||
@@ -179,10 +183,7 @@ export default class GoogleCalendarService implements Calendar {
|
||||
responseStatus: "accepted",
|
||||
},
|
||||
// eslint-disable-next-line
|
||||
...event.attendees.map(({ id, ...rest }) => ({
|
||||
...rest,
|
||||
responseStatus: "accepted",
|
||||
})),
|
||||
...eventAttendees,
|
||||
],
|
||||
reminders: {
|
||||
useDefault: true,
|
||||
|
||||
Reference in new issue
Block a user