Add uid and event responses to tasker calendar event (#18930)
This commit is contained in:
1 parent
e0527587c1
commit
7d4abea9b4
1 file changed
+7
@@ -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<CalendarEvent> = async
|
||||
eventType: {
|
||||
select: {
|
||||
slug: true,
|
||||
bookingFields: true,
|
||||
},
|
||||
},
|
||||
attendees: {
|
||||
@@ -67,6 +69,7 @@ const buildCalendarEvent: (bookingUid: string) => Promise<CalendarEvent> = 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<CalendarEvent> = async
|
||||
},
|
||||
attendees: attendeeList,
|
||||
location: booking.location,
|
||||
...getCalEventResponses({
|
||||
bookingFields: booking?.eventType?.bookingFields ?? null,
|
||||
booking,
|
||||
}),
|
||||
};
|
||||
|
||||
calendarEvent = addVideoCallDataToEvent(booking.references, calendarEvent);
|
||||
|
||||
Reference in new issue
Block a user