fix: no availability on reschedule with load balancing (#17770)

* don't filter if reschedule with same host

* check for reschedule

* fix filtering in handleNewBooking

* fix type error

---------

Co-authored-by: CarinaWolli <[email protected]>
This commit is contained in:
Carina WollendorferandCarinaWolli authored and GitHub committed 2024-11-21 01:22:43 +00:00
1 parent ade144aa20
commit 8bc2c08288
4 files changed
+24 -14

No files matched your search

@@ -479,7 +479,11 @@ async function _getAvailableSlots({ input, ctx }: GetScheduleOptions): Promise<I
throw new TRPCError({ message: "Invalid time range given.", code: "BAD_REQUEST" });
}
const eventHosts = await monitorCallbackAsync(findQualifiedHosts<GetAvailabilityUser>, eventType);
const eventHosts = await monitorCallbackAsync(
findQualifiedHosts<GetAvailabilityUser>,
eventType,
!!input.rescheduleUid
);
const hostsAfterSegmentMatching = await findMatchingHostsWithEventSegment({
eventType,
normalizedHosts: eventHosts,