Skip to content

Conversation

@ThyMinimalDev
Copy link
Contributor

@ThyMinimalDev ThyMinimalDev commented Jan 26, 2026

What does this PR do?

When areCalendarEventsEnabled is set to false in the Platform API, video meeting creation for third-party video apps (like Daily.co) was being skipped entirely. This caused the meetingUrl field in webhook payloads to contain the location identifier (integrations:daily) instead of the actual video meeting URL.

This PR adds a skipCalendarEvent option to EventManager.create() that:

  • Skips calendar event creation when true
  • Skips CRM event creation when true (CRM events are tied to calendar events)
  • Still creates video meetings for third-party video apps like Daily.co

The calling code in handleConfirmation.ts and RegularBookingService.ts now uses this option when areCalendarEventsEnabled is false, ensuring video meetings are still created while respecting the platform customer's preference to manage their own calendar events.

Updates since last revision

  • Updated E2E tests in user-bookings.e2e-spec.ts to verify the new behavior:
    • Tests now verify EventManager.create IS called with skipCalendarEvent: true when areCalendarEventsEnabled is false
    • For recurring bookings, verifies the method is called 3 times (once per booking)
    • For confirmation flow, verifies the method is called once during confirmation

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A - this is a bug fix that doesn't change the documented API behavior.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  1. Create a platform booking with areCalendarEventsEnabled: false and a Daily.co video location (integrations:daily)
  2. Confirm the booking via POST /v2/bookings/:bookingUid/confirm
  3. Verify that:
    • A Daily.co video meeting is created (booking reference should exist)
    • The webhook payload contains the actual video URL in metadata.videoCallUrl instead of integrations:daily
    • No calendar events are created

Human Review Checklist

  • Verify that the E2E test expectations correctly reflect the desired behavior (EventManager.create should be called with skipCalendarEvent: true)
  • Verify that creating video meetings when areCalendarEventsEnabled is false is the desired behavior for platform customers
  • Verify that skipping CRM events when calendar events are skipped is correct
  • Review the OR logic in RegularBookingService: shouldSkipCalendarEvents = !areCalendarEventsEnabled || skipCalendarSyncTaskCreation

Link to Devin run: https://app.devin.ai/sessions/376d3fb807d94924b020a2f3045acaee
Requested by: @ThyMinimalDev

…ting

When areCalendarEventsEnabled is false, video meeting creation for third-party
video apps (like Daily.co) was being skipped, causing the meetingUrl field in
webhook payloads to contain the location identifier (integrations:daily) instead
of the actual video meeting URL.

This fix adds a skipCalendarEvent option to EventManager.create() that:
- Skips calendar event creation when true
- Skips CRM event creation when true (CRM events are tied to calendar events)
- Still creates video meetings for third-party video apps

The calling code in handleConfirmation.ts and RegularBookingService.ts now uses
this option when areCalendarEventsEnabled is false, ensuring video meetings are
still created while respecting the platform customer's preference to manage
their own calendar events.

Co-Authored-By: morgan@cal.com <morgan@cal.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@ThyMinimalDev ThyMinimalDev marked this pull request as ready for review January 26, 2026 11:45
@ThyMinimalDev ThyMinimalDev requested a review from a team as a code owner January 26, 2026 11:45
@graphite-app graphite-app bot added core area: core, team members only foundation labels Jan 26, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

@github-actions
Copy link
Contributor

E2E results are ready!

…hen areCalendarEventsEnabled is false

Co-Authored-By: morgan@cal.com <morgan@cal.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants