fix: HubSpot is not working for team events (#18812)

* fix: hubspot is not working for team events

* update
This commit is contained in:
Anik Dhabal Babu
2025-01-22 20:40:34 +00:00
committed by GitHub
parent 0f07ab2f7b
commit 35565c8f7e
@@ -3,6 +3,7 @@ import { Prisma } from "@prisma/client";
import type { LocationObject } from "@calcom/app-store/locations";
import { getLocationValueForDB } from "@calcom/app-store/locations";
import { sendDeclinedEmailsAndSMS } from "@calcom/emails";
import { getAllCredentials } from "@calcom/features/bookings/lib/getAllCredentialsForUsersOnEvent/getAllCredentials";
import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses";
import { handleConfirmation } from "@calcom/features/bookings/lib/handleConfirmation";
import { handleWebhookTrigger } from "@calcom/features/bookings/lib/handleWebhookTrigger";
@@ -265,13 +266,17 @@ export const confirmHandler = async ({ ctx, input }: ConfirmOptions) => {
...user,
credentials,
};
const allCredentials = await getAllCredentials(userWithCredentials, {
...booking.eventType,
metadata: booking.eventType?.metadata as EventTypeMetadata,
});
const conferenceCredentialId = getLocationValueForDB(
booking.location ?? "",
(booking.eventType?.locations as LocationObject[]) || []
);
evt.conferenceCredentialId = conferenceCredentialId.conferenceCredentialId;
await handleConfirmation({
user: userWithCredentials,
user: { ...user, credentials: allCredentials },
evt,
recurringEventId,
prisma,