@@ -9,19 +9,22 @@ import type {
99 GetAvailabilityUser ,
1010 UserAvailabilityService ,
1111} from "@calcom/features/availability/lib/getUserAvailability" ;
12+ import type { IGetAvailableSlots } from "@calcom/features/bookings/Booker/hooks/useAvailableTimeSlots" ;
1213import type { CheckBookingLimitsService } from "@calcom/features/bookings/lib/checkBookingLimits" ;
1314import { checkForConflicts } from "@calcom/features/bookings/lib/conflictChecker/checkForConflicts" ;
1415import type { QualifiedHostsService } from "@calcom/features/bookings/lib/host-filtering/findQualifiedHostsWithDelegationCredentials" ;
1516import { isEventTypeLoggingEnabled } from "@calcom/features/bookings/lib/isEventTypeLoggingEnabled" ;
1617import type { BookingRepository } from "@calcom/features/bookings/repositories/BookingRepository" ;
1718import type { BusyTimesService } from "@calcom/features/busyTimes/services/getBusyTimes" ;
1819import type { getBusyTimesService } from "@calcom/features/di/containers/BusyTimes" ;
20+ import type { OrgMembershipLookup } from "@calcom/features/di/modules/OrgMembershipLookup" ;
1921import type { TeamRepository } from "@calcom/features/ee/teams/repositories/TeamRepository" ;
2022import { getDefaultEvent } from "@calcom/features/eventtypes/lib/defaultEvents" ;
2123import type { EventTypeRepository } from "@calcom/features/eventtypes/repositories/eventTypeRepository" ;
2224import type { FeaturesRepository } from "@calcom/features/flags/features.repository" ;
2325import type { PrismaOOORepository } from "@calcom/features/ooo/repositories/PrismaOOORepository" ;
2426import type { IRedisService } from "@calcom/features/redis/IRedisService" ;
27+ import type { RoutingFormResponseRepository } from "@calcom/features/routing-forms/repositories/RoutingFormResponseRepository" ;
2528import { buildDateRanges } from "@calcom/features/schedules/lib/date-ranges" ;
2629import getSlots from "@calcom/features/schedules/lib/slots" ;
2730import type { ScheduleRepository } from "@calcom/features/schedules/repositories/ScheduleRepository" ;
@@ -48,7 +51,6 @@ import {
4851import logger from "@calcom/lib/logger" ;
4952import { safeStringify } from "@calcom/lib/safeStringify" ;
5053import { withReporting } from "@calcom/lib/sentryWrapper" ;
51- import type { RoutingFormResponseRepository } from "@calcom/features/routing-forms/repositories/RoutingFormResponseRepository" ;
5254import { PeriodType , SchedulingType } from "@calcom/prisma/enums" ;
5355import type { CalendarFetchMode , EventBusyDate , EventBusyDetails } from "@calcom/types/Calendar" ;
5456import type { CredentialForCalendarService } from "@calcom/types/Credential" ;
@@ -57,8 +59,6 @@ import type { Logger } from "tslog";
5759import { v4 as uuid } from "uuid" ;
5860import type { TGetScheduleInputSchema } from "./getSchedule.schema" ;
5961import type { GetScheduleOptions } from "./types" ;
60- import type { OrgMembershipLookup } from "@calcom/features/di/modules/OrgMembershipLookup" ;
61- import type { IGetAvailableSlots } from "@calcom/features/bookings/Booker/hooks/useAvailableTimeSlots" ;
6262
6363const log = logger . getSubLogger ( { prefix : [ "[slots/util]" ] } ) ;
6464const DEFAULT_SLOTS_CACHE_TTL = 2000 ;
@@ -861,16 +861,13 @@ export class AvailableSlotsService {
861861 // without being constrained by other guests' schedules.
862862 if ( rescheduledBy ) {
863863 const hostEmail = original . user ?. email ;
864- const isHostReschedule =
865- hostEmail && rescheduledBy . toLowerCase ( ) === hostEmail . toLowerCase ( ) ;
864+ const isHostReschedule = hostEmail && rescheduledBy . toLowerCase ( ) === hostEmail . toLowerCase ( ) ;
866865 if ( ! isHostReschedule ) {
867866 return [ ] ;
868867 }
869868 }
870869
871- const emails = original . attendees
872- . map ( ( a ) => a . email )
873- . filter ( ( e ) : e is string => Boolean ( e ) ) ;
870+ const emails = original . attendees . map ( ( a ) => a . email ) . filter ( ( e ) : e is string => Boolean ( e ) ) ;
874871 if ( ! emails . length ) return [ ] ;
875872
876873 const calUsers = await this . dependencies . userRepo . findByEmails ( { emails } ) ;
0 commit comments