fix zoom leading to integrations:zoom location (#1242)

This commit is contained in:
Alex Johansson authored and GitHub committed 2021-12-02 17:18:17 +00:00
1 parent 813eaa83b7
commit de3c4aa75a
2 files changed
+7 -3

No files matched your search

+6 -2
View File
@@ -117,17 +117,21 @@ export default class EventManager {
const evt = processLocation(event);
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<EventResult> = await this.createAllCalendarEvents(evt);
const results: Array<EventResult> = [];
// If and only if event type is a dedicated meeting, create a dedicated video meeting.
if (isDedicated) {
const result = await this.createVideoEvent(evt);
if (result.createdEvent) {
evt.videoCallData = result.createdEvent;
evt.location = result.createdEvent.url;
}
results.push(result);
}
// Create the calendar event with the proper video call data
results.push(...(await this.createAllCalendarEvents(evt)));
const referencesToCreate: Array<PartialReference> = results.map((result: EventResult) => {
return {
type: result.type,