From 7d4abea9b4838561e7171a3a37f1221d9c705cf8 Mon Sep 17 00:00:00 2001 From: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Date: Mon, 27 Jan 2025 17:29:48 -0500 Subject: [PATCH] Add uid and event responses to tasker calendar event (#18930) --- .../features/tasker/tasks/crm/lib/buildCalendarEvent.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/features/tasker/tasks/crm/lib/buildCalendarEvent.ts b/packages/features/tasker/tasks/crm/lib/buildCalendarEvent.ts index d1ea41f6cc..7c360cb4ca 100644 --- a/packages/features/tasker/tasks/crm/lib/buildCalendarEvent.ts +++ b/packages/features/tasker/tasks/crm/lib/buildCalendarEvent.ts @@ -1,3 +1,4 @@ +import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses"; import { addVideoCallDataToEvent } from "@calcom/features/bookings/lib/handleNewBooking/addVideoCallDataToEvent"; import { getTranslation } from "@calcom/lib/server"; import prisma from "@calcom/prisma"; @@ -22,6 +23,7 @@ const buildCalendarEvent: (bookingUid: string) => Promise = async eventType: { select: { slug: true, + bookingFields: true, }, }, attendees: { @@ -67,6 +69,7 @@ const buildCalendarEvent: (bookingUid: string) => Promise = async const attendeeList = await Promise.all(attendeePromises); let calendarEvent: CalendarEvent = { + uid: bookingUid, type: booking.eventType.slug, title: booking.title, startTime: booking.startTime.toISOString(), @@ -80,6 +83,10 @@ const buildCalendarEvent: (bookingUid: string) => Promise = async }, attendees: attendeeList, location: booking.location, + ...getCalEventResponses({ + bookingFields: booking?.eventType?.bookingFields ?? null, + booking, + }), }; calendarEvent = addVideoCallDataToEvent(booking.references, calendarEvent);