If no location is set, default to Cal Video (#5812)

* Default to Cal Video

* Show web conferencing details to follow on success page

* Show web conferencing details to follow on success page

* Show web conferencing details to follow on success page

* Type fixes

* Pass tests

Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
Joe Au-YeungandAlex van Andel authored and GitHub committed 2022-12-01 10:20:01 -05:00
1 parent 056406bdd9
commit 5e88ad50ea
5 files changed
+18 -4

No files matched your search

+3 -1
View File
@@ -100,6 +100,8 @@ export default class EventManager {
*/
public async create(event: CalendarEvent): Promise<CreateUpdateResult> {
const evt = processLocation(event);
// Fallback to cal video if no location is set
if (!evt.location) evt["location"] = "integrations:daily";
const isDedicated = evt.location ? isDedicatedIntegration(evt.location) : null;
const results: Array<EventResult<Exclude<Event, AdditionalInformation>>> = [];
@@ -107,7 +109,7 @@ export default class EventManager {
if (isDedicated) {
const result = await this.createVideoEvent(evt);
if (result.createdEvent) {
if (result?.createdEvent) {
evt.videoCallData = result.createdEvent;
evt.location = result.originalEvent.location;
result.type = result.createdEvent.type;