From 2430784142cc96a546d57412bc3d9e0b55e9beac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20L=C3=B3pez?= Date: Thu, 2 Dec 2021 14:41:09 -0700 Subject: [PATCH] Followup for #1242 (#1243) --- lib/events/EventManager.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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: {