fix: HubSpot is not working for team events (#18812)
* fix: hubspot is not working for team events * update
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user