mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-28 07:35:27 -04:00
a6400c10af
A single-day all-day event whose source writes DTEND equal to DTSTART (treating DTEND as an inclusive bound rather than the RFC 5545 exclusive one) was stored verbatim as a zero-duration row. list_events selects events overlapping the window with `dtstart < end AND dtend > start`, so that row is filtered out for any window starting at or after its date and the event never appears, even though the import reported success. Events created via the API never hit this because creation always synthesizes a positive duration; only the two import paths can persist a non-positive one. Clamp a non-positive end at import (import_ics and the CalDAV pull) to the same default span used when DTEND is absent: one day for all-day events, one hour otherwise. Also repair the persisted state for users who already imported before this clamp existed. Their stored zero-duration row is invisible, and re-importing the same ICS hit the duplicate branch and skipped without touching it, so the event stayed hidden. The duplicate branch now backfills the clamp onto the matched row before skipping, and the response reports a `repaired` count. (The CalDAV pull already rewrites dtend on re-sync, so it self-heals.)