feat(calendar): update Event model and patch caldav.create_event with uid param
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -176,6 +176,7 @@ async def create_event(
|
||||
reminder_minutes: int | None = None,
|
||||
attendees: list[str] | None = None,
|
||||
calendar_name: str | None = None,
|
||||
uid: str | None = None,
|
||||
) -> dict:
|
||||
"""Create a calendar event.
|
||||
|
||||
@@ -193,6 +194,11 @@ async def create_event(
|
||||
cal.add("version", "2.0")
|
||||
|
||||
event = icalendar.Event()
|
||||
if uid:
|
||||
# Remove auto-generated UID if the library added one, then inject ours
|
||||
if "UID" in event:
|
||||
del event["UID"]
|
||||
event.add("uid", uid)
|
||||
event.add("summary", title)
|
||||
|
||||
if all_day:
|
||||
|
||||
Reference in New Issue
Block a user