From: Alexandre Duret-Lutz Date: Wed, 22 Sep 2021 20:28:28 +0000 (+0200) Subject: default role for attendees is REQ-PARTICIPANT X-Git-Tag: emacs-29.0.90~3671^2~705 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6c0824f711906cd0413b14d7dfc35a5bf411eb52;p=emacs.git default role for attendees is REQ-PARTICIPANT * 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. --- diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index 348da12db11..a2ae2a96689 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el @@ -194,7 +194,9 @@ (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) @@ -225,7 +227,8 @@ (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)