fix: Fixes Jelly type mismatch and passes conference credential id when confirm bookings (#14209)

* On confirmation get the conference credential id

* Fix misconfigured location type

---------

Co-authored-by: Bailey Pumfleet <bailey@pumfleet.co.uk>
This commit is contained in:
Joe Au-Yeung
2024-03-25 23:15:23 -04:00
committed by GitHub
co-authored by Bailey Pumfleet
parent d391f35389
commit da7c5ec407
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
"email": "support@jellyjelly.com",
"appData": {
"location": {
"type": "integrations:{SLUG}_video",
"type": "integrations:{SLUG}_conferencing",
"label": "{TITLE}",
"linkType": "dynamic"
}
@@ -1,6 +1,8 @@
import { Prisma } from "@prisma/client";
import appStore from "@calcom/app-store";
import { getLocationValueForDB } from "@calcom/app-store/locations";
import type { LocationObject } from "@calcom/app-store/locations";
import { sendDeclinedEmails } from "@calcom/emails";
import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses";
import { handleConfirmation } from "@calcom/features/bookings/lib/handleConfirmation";
@@ -67,6 +69,7 @@ export const confirmHandler = async ({ ctx, input }: ConfirmOptions) => {
bookingFields: true,
disableGuests: true,
metadata: true,
locations: true,
team: {
select: {
parentId: true,
@@ -248,6 +251,11 @@ export const confirmHandler = async ({ ctx, input }: ConfirmOptions) => {
...user,
credentials,
};
const conferenceCredentialId = getLocationValueForDB(
booking.location ?? "",
(booking.eventType?.locations as LocationObject[]) || []
);
evt.conferenceCredentialId = conferenceCredentialId.conferenceCredentialId;
await handleConfirmation({
user: userWithCredentials,
evt,