Repository navigation
Conversation
The .ics attached to booking emails used a random UID, so calendar clients could not match it to the invite Google sends for the same event. Accepting both left the meeting on the calendar twice, and a reschedule left a stale copy at the old time. The .ics now reuses the Google event's iCalUID and sequence (one events.get per send_meet_email run). Events not synced to Google get a stable UID per Event and a SEQUENCE that grows with each save. METHOD is REQUEST when an ORGANIZER is present, PUBLISH otherwise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…roup The endpoint enqueues a background job, which escapes the GET rollback, so Frappe's semgrep rule whitelisted-side-effect-on-get now blocks it. Its only caller (appointment_group.js) uses frappe.call, which posts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
Generated scheduling requests lack attendees and may use an organizer inconsistent with the Google event.
3 open findings
What changed in this PR
Adds stable ICS identities so calendar clients can merge booking updates with Google Calendar events.
Changes:
- Reuses Google UID/sequence or generates stable local identities.
- Selects ICS
METHODbased on organizer presence. - Reuses one identity across outgoing emails and adds tests.
| File | Description |
|---|---|
helpers/ics_file.py |
Generates stable ICS identity and method. |
overrides/event_override.py |
Reuses identity across attachments. |
tests/helpers/test_ics_file.py |
Tests UID, sequence, fallback, and method behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Review follow-up: - Google-backed .ics files reuse the Google event's ORGANIZER and ATTENDEE list, so the REQUEST matches Google's own invite for the same UID. METHOD is REQUEST only when both are known, else PUBLISH. - hide_ics_organizer also drops the attendee list, since Google lists the organiser among the attendees. - send_meet_email looks up the identity only when an email with an .ics is actually sent, and once for both emails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
Each booking sends attendees two invites: Google's own (
sendUpdates="all") and an app email with aninvite.ics. The.icsused a randomuuid4()UID, so calendar clients could not tell it was the same event. Accepting both put the meeting on the calendar twice, and a reschedule added another.icsentry while the old one stayed at the old time.Fix
helpers/ics_file.py: newget_ics_identity(event)returns the UID and SEQUENCE for the.ics:iCalUIDandsequence, so clients merge the.icswith Google's invite and move it in place on reschedule. If the fetch fails, it falls back to<google_calendar_event_id>@google.comwith no SEQUENCE, and the error is logged.<event name>@<site>UID, with SEQUENCE set to themodifiedtimestamp so it grows on each reschedule..icsnow setsMETHOD:REQUESTwhen it has an ORGANIZER, andMETHOD:PUBLISHwhen the organizer is hidden (hide_ics_organizer).send_meet_emaillooks up the UID and SEQUENCE once and reuses them for both the organiser and booker emails. That is one extra Googleevents.getper send.Tests
tests/helpers/test_ics_file.pyadds tests for:The full app suite passes locally (185 tests).
For reviewers
.icschanges. Attendees still get two emails (Google's and the app's), but should now see one calendar entry.🤖 Generated with Claude Code