Fixing default event location URL for dynamic events (#8396)

* Set bookingLocaiton to URL if there is a default location

* Update packages/features/bookings/lib/handleNewBooking.ts

* Suggestions implmented

* Remove old implemntation

* Cleanup
pull/8399/head
sean-brydon 2023-04-20 12:38:57 +01:00 committed by GitHub
parent 33e394d5ed
commit 2ab597addc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -683,8 +683,7 @@ async function handler(
return aIndex - bIndex;
});
const firstUsersMetadata = userMetadataSchema.parse(users[0].metadata);
const app = getAppFromSlug(firstUsersMetadata?.defaultConferencingApp?.appSlug);
locationBodyString = app?.appData?.location?.type || locationBodyString;
locationBodyString = firstUsersMetadata?.defaultConferencingApp?.appLink || locationBodyString;
defaultLocationUrl = firstUsersMetadata?.defaultConferencingApp?.appLink;
}
@ -840,6 +839,7 @@ async function handler(
const calEventUserFieldsResponses =
"calEventUserFieldsResponses" in reqBody ? reqBody.calEventUserFieldsResponses : null;
let evt: CalendarEvent = {
type: eventType.title,
title: getEventName(eventNameObject), //this needs to be either forced in english, or fetched for each attendee and organizer separately