From 04ed215bfa211620b6bd157fa745cd59f6a891ed Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Wed, 22 Sep 2021 16:30:21 +0200 Subject: [PATCH 1/3] reply to the organizer of an ical event RFC5546 specifies that participant status (accepted, tentative, declined) should be sent to the organizer of the event. That organizer is not necessarily the sender of the invitation; for instance Google Calendar uses custom email addresses to receive these notifications. * lisp/gnus/gnus-icalendar.el (gnus-icalendar-send-buffer-by-mail): Replace the default recipient of the reply by the organizer of the event. (gnus-icalendar-reply) Pass that organizer to the previous function. --- lisp/gnus/gnus-icalendar.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index b6e5e7f786..514feff284 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el @@ -847,10 +847,14 @@ gnus-icalendar-insert-button button t gnus-data ,data)))) -(defun gnus-icalendar-send-buffer-by-mail (buffer-name subject) +(defun gnus-icalendar-send-buffer-by-mail (buffer-name subject organizer) (let ((message-signature nil)) (with-current-buffer gnus-summary-buffer (gnus-summary-reply) + ;; Reply to the organizer, not to whoever sent the invitation. person + ;; Some calendar systems use specific email address as organizer to + ;; receive these responses. + (message-replace-header "To" organizer) (message-goto-body) (mml-insert-multipart "alternative") (mml-insert-empty-tag 'part 'type "text/plain") @@ -866,7 +870,8 @@ gnus-icalendar-reply (event (caddr data)) (reply (gnus-icalendar-with-decoded-handle handle (gnus-icalendar-event-reply-from-buffer - (current-buffer) status (gnus-icalendar-identities))))) + (current-buffer) status (gnus-icalendar-identities)))) + (organizer (gnus-icalendar-event:organizer event))) (when reply (cl-labels @@ -883,7 +888,7 @@ gnus-icalendar-reply (delete-region (point-min) (point-max)) (insert reply) (fold-icalendar-buffer) - (gnus-icalendar-send-buffer-by-mail (buffer-name) subject)) + (gnus-icalendar-send-buffer-by-mail (buffer-name) subject organizer)) ;; Back in article buffer (setq-local gnus-icalendar-reply-status status) -- 2.33.0