Summary

This PR implements guest availability checking during host reschedule to address issue #16378. When a host reschedules a booking, the system now checks if attendees who are Cal.com users are available at the new time and only shows mutually available slots.

Revives closed PR #22550 - rebased on latest main with a fresh implementation.

Changes Made

  • Core Logic: Added getGuestBusyTimesForReschedule method in AvailableSlotsService to fetch busy times for Cal.com guest users
  • Availability Integration: Modified getUsersAvailability to include guest busy times in availability calculation
  • Repository Methods: Added findUsersByEmails and findBookingsByUserIdsAndDateRange methods
  • Scheduling Logic: Only applies guest availability checking for non-collective scheduling types
  • Comprehensive Testing: Added test cases covering various scenarios

Technical Details

The implementation works by:

  1. Fetching the original booking’s attendees during reschedule
  2. Identifying which attendees are Cal.com users via email lookup
  3. Retrieving busy times for those Cal.com users
  4. Including guest busy times in the host’s availability calculation
  5. Filtering out slots where any guest is busy

Type of Change

  • New feature (non-breaking change which adds functionality)

Test plan

  • Excludes slots when Cal.com guest users are busy
  • Includes all slots when guests are not Cal.com users
  • Handles multiple Cal.com guest users correctly
  • Bypasses guest availability check for collective events

Fixes #16378

/claim #16378

Claim

Total prize pool $200
Total paid $0
Status Pending
Submitted January 16, 2026
Last updated January 16, 2026

Contributors

YU

Yuvraj Angad Singh

@yuvrajangadsingh

100%

Sponsors

CA

Cal.com, Inc.

@cal

$200