[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 51226e4 1/3: reply to the organizer of an ical event
From: |
Lars Ingebrigtsen |
Subject: |
master 51226e4 1/3: reply to the organizer of an ical event |
Date: |
Fri, 1 Oct 2021 08:09:24 -0400 (EDT) |
branch: master
commit 51226e42807c1554a83fde0081d57c0c9248c409
Author: Alexandre Duret-Lutz <adl@lrde.epita.fr>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
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 b6e5e7f..514feff 100644
--- a/lisp/gnus/gnus-icalendar.el
+++ b/lisp/gnus/gnus-icalendar.el
@@ -847,10 +847,14 @@ These will be used to retrieve the RSVP information from
ical events."
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 @@ These will be used to retrieve the RSVP information from
ical events."
(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 @@ These will be used to retrieve the RSVP information from
ical events."
(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)