Scheduling infrastructure for absolutely everyone.
Fixes #1021 - correctly replace integrations:google:meet (#1071)
Alex van Andeleefb829f7548
diff --git a/lib/events/EventManager.ts b/lib/events/EventManager.tsindex 97ef3946e6d..e0be3109215 100644--- a/lib/events/EventManager.ts+++ b/lib/events/EventManager.ts@@ -82,8 +82,8 @@ export default class EventManager {let evt = EventManager.processLocation(event);const isDedicated = evt.location ? EventManager.isDedicatedIntegration(evt.location) : null;- let results: Array<EventResult> = [];-+ // First, create all calendar events. If this is a dedicated integration event, don't send a mail right here.+ const results: Array<EventResult> = await this.createAllCalendarEvents(evt, isDedicated);// If and only if event type is a dedicated meeting, create a dedicated video meeting.if (isDedicated) {const result = await this.createVideoEvent(evt);@@ -95,10 +95,6 @@ export default class EventManager {await EventManager.sendAttendeeMail("new", results, evt);}- // Now create all calendar events. If this is a dedicated integration event,- // don't send a mail right here, because it has already been sent.- results = results.concat(await this.createAllCalendarEvents(evt, isDedicated));-const referencesToCreate: Array<PartialReference> = results.map((result: EventResult) => {let uid = "";if (result.createdEvent) {@@ -162,9 +158,8 @@ export default class EventManager {}const isDedicated = evt.location ? EventManager.isDedicatedIntegration(evt.location) : null;-- let results: Array<EventResult> = [];-+ // First, create all calendar events. If this is a dedicated integration event, don't send a mail right here.+ const results: Array<EventResult> = await this.updateAllCalendarEvents(evt, booking, isDedicated);// If and only if event type is a dedicated meeting, update the dedicated video meeting.if (isDedicated) {const result = await this.updateVideoEvent(evt, booking);@@ -175,11 +170,6 @@ export default class EventManager {} else {await EventManager.sendAttendeeMail("reschedule", results, evt);}-- // Now update all calendar events. If this is a dedicated integration event,- // don't send a mail right here, because it has already been sent.- results = results.concat(await this.updateAllCalendarEvents(evt, booking, isDedicated));-// Now we can delete the old booking and its references.const bookingReferenceDeletes = prisma.bookingReference.deleteMany({where: {