From 04e042d3ea9ba8760071e6fee4a648a54027138f Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Wed, 22 Sep 2021 22:28:28 +0200 Subject: [PATCH 3/3] 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. --- lisp/gnus/gnus-icalendar.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index 348da12db1..a2ae2a9668 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el @@ -194,7 +194,9 @@ gnus-icalendar-event--get-attendee-names (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-from-ical (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) -- 2.33.0