thunderbird/appointment

Check before accessing event attributes on caldav

Closed this issue · 2 comments

I'll look into this. I found the following spec:

eventprop  = *(
            ;
            ; The following are REQUIRED,
            ; but MUST NOT occur more than once.
            ;
            dtstamp / uid /
            ;
            ; The following is REQUIRED if the component
            ; appears in an iCalendar object that doesn't
            ; specify the ["METHOD"](https://icalendar.org/iCalendar-RFC-5545/3-7-2-method.html) property; otherwise, it
            ; is OPTIONAL; in any case, it MUST NOT occur
            ; more than once.
            ;
            dtstart /
            ;
            ; The following are OPTIONAL,
            ; but MUST NOT occur more than once.
            ;
            class / created / description / geo /
            last-mod / location / organizer / priority /
            seq / status / summary / transp /
            url / recurid /
            ;
            ; The following is OPTIONAL,
            ; but SHOULD NOT occur more than once.
            ;
            rrule /
            ;
            ; Either 'dtend' or 'duration' MAY appear in
            ; a 'eventprop', but 'dtend' and 'duration'
            ; MUST NOT occur in the same 'eventprop'.
            ;
            dtend / duration /
            ;
            ; The following are OPTIONAL,
            ; and MAY occur more than once.
            ;
            attach / attendee / categories / comment /
            contact / exdate / rstatus / related /
            resources / rdate / x-prop / iana-prop
            ;
            )

So we might indeed handle everything as optional except for dtstart.

I think we can ignore events that don't have a dtend/duration. Unless there's some existing behaviour that's expected for end-users.