]> git.eshelyaron.com Git - emacs.git/commitdiff
default role for attendees is REQ-PARTICIPANT
authorAlexandre Duret-Lutz <adl@lrde.epita.fr>
Wed, 22 Sep 2021 20:28:28 +0000 (22:28 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 1 Oct 2021 12:07:58 +0000 (14:07 +0200)
* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-event--get-attendee-names,
gnus-icalendar-event-from-ical): When the ROLE property
is missing from an ATTENDEE line, follow RFC5546 and default
to REQ-PARTICIPANT.

lisp/gnus/gnus-icalendar.el

index 348da12db110016d96b7c696107814e332d7c427..a2ae2a966892f9ccf6f94f95b969eda78c5ed11c 100644 (file)
                           (caddr event))))
 
     (cl-labels
-       ((attendee-role (prop) (plist-get (cadr prop) 'ROLE))
+       ((attendee-role (prop)
+                        ;; RFC5546: default ROLE is REQ-PARTICIPANT
+                        (or (plist-get (cadr prop) 'ROLE) "REQ-PARTICIPANT"))
         (attendee-name
          (prop)
          (or (plist-get (cadr prop) 'CN)
                      (gnus-icalendar-event--find-attendee
                       ical attendee-name-or-email)))
          (attendee-names (gnus-icalendar-event--get-attendee-names ical))
-         (role (plist-get (cadr attendee) 'ROLE))
+         ;; RFC5546: default ROLE is REQ-PARTICIPANT
+         (role (or (plist-get (cadr attendee) 'ROLE) "REQ-PARTICIPANT"))
          (participation-type (pcase role
                                ("REQ-PARTICIPANT" 'required)
                                ("OPT-PARTICIPANT" 'optional)