diff --git a/lib/events/EventManager.ts b/lib/events/EventManager.ts index 958bf33abc..c819162911 100644 --- a/lib/events/EventManager.ts +++ b/lib/events/EventManager.ts @@ -189,17 +189,20 @@ export default class EventManager { } const isDedicated = evt.location ? isDedicatedIntegration(evt.location) : null; - // First, create all calendar events. If this is a dedicated integration event, don't send a mail right here. - const results: Array = await this.updateAllCalendarEvents(evt, booking); + const results: Array = []; // If and only if event type is a dedicated meeting, update the dedicated video meeting. if (isDedicated) { const result = await this.updateVideoEvent(evt, booking); if (result.updatedEvent) { evt.videoCallData = result.updatedEvent; + evt.location = result.updatedEvent.url; } results.push(result); } + // Update all calendar events. + results.push(...(await this.updateAllCalendarEvents(evt, booking))); + // Now we can delete the old booking and its references. const bookingReferenceDeletes = prisma.bookingReference.deleteMany({ where: {