Skip to content

Scheduling infrastructure for absolutely everyone.

fix: booking limits for team event types (#14135)

Carina Wollendorferaaf630ed18ff
diff --git a/packages/features/bookings/lib/handleNewBooking.ts b/packages/features/bookings/lib/handleNewBooking.ts
index 4cc90da2626..8c406bc23fc 100644
--- a/packages/features/bookings/lib/handleNewBooking.ts
+++ b/packages/features/bookings/lib/handleNewBooking.ts
@@ -371,7 +371,7 @@ export async function ensureAvailableUsers(
user,
eventType,
rescheduleUid: input.originalRescheduledBooking?.uid ?? null,
- busyTimesFromLimitsBookings: busyTimesFromLimitsBookingsAllUsers.filter((b) => b.userId === user.id),
+ busyTimesFromLimitsBookings: busyTimesFromLimitsBookingsAllUsers,
}
);
diff --git a/packages/trpc/server/routers/viewer/slots/util.ts b/packages/trpc/server/routers/viewer/slots/util.ts
index b8bf34d8627..ef9be82ab52 100644
--- a/packages/trpc/server/routers/viewer/slots/util.ts
+++ b/packages/trpc/server/routers/viewer/slots/util.ts
@@ -472,9 +472,7 @@ export async function getAvailableSlots({ input, ctx }: GetScheduleOptions) {
const { attendees: _attendees, ...bookingWithoutAttendees } = bookings;
return bookingWithoutAttendees;
}),
- busyTimesFromLimitsBookings: busyTimesFromLimitsBookingsAllUsers.filter(
- (b) => b.userId === currentUser.id
- ),
+ busyTimesFromLimitsBookings: busyTimesFromLimitsBookingsAllUsers,
}
);
if (!currentSeats && _currentSeats) currentSeats = _currentSeats;