Skip to content

fix(bookings): generate unique videoCallUrl per recurring booking occurrence#28881

Draft
paulonasc wants to merge 1 commit intocalcom:mainfrom
paulonasc:lavish-bank
Draft

fix(bookings): generate unique videoCallUrl per recurring booking occurrence#28881
paulonasc wants to merge 1 commit intocalcom:mainfrom
paulonasc:lavish-bank

Conversation

@paulonasc
Copy link
Copy Markdown

Summary

  • Each Daily.co recurring booking occurrence now derives its own room URL via getPublicVideoCallUrl(uid) instead of all occurrences sharing the first booking's URL
  • Fixes both booking.metadata.videoCallUrl stored in the database and the webhook payloads sent during confirmation
  • Adds optional uid parameter to expectWebhookToHaveBeenCalledWith / expectBookingCreatedWebhookToHaveBeenFired to assert per-occurrence URLs

Root Cause

handleConfirmation.ts computed a single meetingUrl from the first booking's scheduleResult and applied it to all unconfirmed recurring occurrences in the .map() loop. For Daily.co, each booking UID deterministically maps to a unique room URL via /video/<uid>, so sharing the first UID's URL means future meetings point to a stale/expired room.

Changes

File Change
packages/features/bookings/lib/handleConfirmation.ts Per-occurrence URL via getPublicVideoCallUrl(uid) for Daily.co, with fallback to shared meetingUrl for other providers
packages/testing/src/lib/bookingScenario/expects.ts Added uid parameter to webhook assertion helpers for filtering by booking uid
apps/web/pages/api/book/recurring-event.test.ts Replaced 3× FIXME comments with proper per-occurrence URL assertions

Test plan

  • TZ=UTC yarn test apps/web/pages/api/book/recurring-event.test.ts — all 5 tests pass
  • No new TypeScript errors introduced in changed files
  • Non-Daily.co providers continue to share a single meeting URL (unchanged behavior)

Fixes #11955

🤖 Generated with Claude Code

…urrence

Each Cal Video (Daily.co) recurring booking occurrence now derives its own
room URL via `getPublicVideoCallUrl(uid)` instead of sharing the first
booking's URL. The fix covers both the `booking.metadata.videoCallUrl`
stored in the database and the webhook payloads sent on confirmation.

`expectWebhookToHaveBeenCalledWith` now accepts an optional `uid` parameter
so tests can assert the correct per-occurrence URL in `BOOKING_CREATED`
webhooks, replacing three FIXME comments in `recurring-event.test.ts`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added bookings area: bookings, availability, timezones, double booking cal video Medium priority Created by Linear-GitHub Sync 🐛 bug Something isn't working labels Apr 14, 2026
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Paulo Nascimento seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bookings area: bookings, availability, timezones, double booking 🐛 bug Something isn't working cal video Medium priority Created by Linear-GitHub Sync size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

All Recurring Bookings possibly having same CalVideo URL causing expired CalVideo meetings.

2 participants