Skip to content

fix(googlecalendar): suppress notifications on hangout-link follow-up patch - #30049

Draft
AlgoArtist06 wants to merge 1 commit into
calcom:mainfrom
AlgoArtist06:fix/google-calendar-sendupdates-none-on-patch
Draft

fix(googlecalendar): suppress notifications on hangout-link follow-up patch#30049
AlgoArtist06 wants to merge 1 commit into
calcom:mainfrom
AlgoArtist06:fix/google-calendar-sendupdates-none-on-patch

Conversation

@AlgoArtist06

Copy link
Copy Markdown

What does this PR do?

Fixes #30044

Part of the bug report in #30044: when a booking is created with Google
Calendar + Google Meet, events.insert is called with sendUpdates: "none"
so that Cal.diy manages its own confirmation emails and Google does not send a
notification. A follow-up events.patch then writes the Meet/hangout link into
the event description, but it omits sendUpdates entirely. Google therefore
notifies the attendee about the change with an "Updated invitation" email even
though no original invitation was ever sent to them - the attendee's only
interaction with the event is a phantom update email.

This change makes the follow-up patch consistent with the insert by passing
sendUpdates: "none", so Google stops sending that misleading notification
(it also removes the accidental email channel that this issue reports being
lost on the failure path).

Note: this PR addresses the notification-inconsistency part of #30044 (the
reporter's option 3). The broader question of sending Cal.diy's confirmation
emails when a calendar integration fails (options 1 and 2) is a larger
behavior change and is left to a follow-up.

Visual Demo (For contributors especially)

N/A - this is a one-line API parameter change; behavior is covered by the unit
test assertion added in this PR.

Video Demo (if applicable):

N/A

Image Demo (if applicable):

N/A

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 if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox. N/A
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • No environment variables are required.
  • Unit test: packages/app-store/googlecalendar/lib/__tests__/CalendarService.test.ts - the createEvent > should patch event location with hangoutLink when event is created with hangoutLink test now asserts that the follow-up events.patch call includes sendUpdates: "none".
  • Run: yarn vitest run packages/app-store/googlecalendar/lib/__tests__/CalendarService.test.ts
  • Local check: all 20 tests in the file pass. The new assertion fails (patch omits sendUpdates) before the fix and passes after it.

Checklist

  • My PR is small (<500 lines and <10 files; this PR is 2 files, +5 lines) and should NOT be split into smaller PRs

Automated by pr-pipeline (com.ashutosh.prpipeline).

@github-actions

Copy link
Copy Markdown
Contributor

Welcome to Cal.diy, @AlgoArtist06! Thanks for opening this pull request.

A few things to keep in mind:

  • This is Cal.diy, not Cal.com. Cal.diy is a community-driven, fully open-source fork of Cal.com licensed under MIT. Your changes here will be part of Cal.diy — they will not be deployed to the Cal.com production app.
  • Please review our Contributing Guidelines if you haven't already.
  • Make sure your PR title follows the Conventional Commits format.

A maintainer will review your PR soon. Thanks for contributing!

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.

[BUG] All booking emails silently skipped when every calendar integration result fails — guest receives no notification at all

1 participant