fix(caldav): robust SCHEDULE-AGENT injection and attendee deduplication

Description

Closes #9485 /claim #9485

Problem

When creating events via CalDAV providers like Fastmail, the server often automatically sends invitation emails to attendees. Since Cal.com also sends its own emails, this results in users receiving duplicate invitations. Additionally, attendees appearing in both guest and team lists could receive multiple invites from Cal.com itself.

Solution

  1. Robust SCHEDULE-AGENT Injection: Injects SCHEDULE-AGENT=CLIENT into ORGANIZER and ATTENDEE properties using a robust regex that handles both CRLF/LF line endings and varying property parameter formats.
  2. Attendee Deduplication: Implemented logic to deduplicate attendees by email address before generating the iCalendar string.

Changes

  • Modified packages/lib/CalendarService.ts
  • Added comprehensive unit tests in packages/lib/CalendarService.test.ts

Testing

  • Verified robust regex against CRLF and LF line endings.
  • Verified parameter injection with and without existing parameters (; vs :).
  • Verified attendee deduplication logic.
  • Added Vitest unit tests to prevent regressions.

Claim

Total prize pool $500
Total paid $0
Status Pending
Submitted December 31, 2025
Last updated December 31, 2025

Contributors

SI

sixoverme

@sixoverme

100%

Sponsors

CA

Cal.com, Inc.

@cal

$500