mirror of https://github.com/djcb/mu.git
Fix empty 'To:' header on reply to icalendar invitation
On reply to an ical invitation the To: header stayed empty, this fixes that. The 'Reply-To' data is set if it is not there and if the emaill was different from the Organizer so that the msg can be further treated by the draft construct functions. This issue is briefly mentioned in issue #2305
This commit is contained in:
parent
f5ce9abf71
commit
65f9fbf0ba
|
@ -136,18 +136,19 @@
|
|||
(mu4e-sent-messages-behavior 'delete)
|
||||
(mu4e-compose-reply-recipients 'sender)
|
||||
(ical-msg (cl-copy-list msg)))
|
||||
;; Make sure the reply is sent to the organiser.
|
||||
;; Make sure the reply is sent to email of the organiser with proper name.
|
||||
(let* ((organizer (gnus-icalendar-event:organizer event))
|
||||
(reply-to (plist-get msg :reply-to))
|
||||
(name (or (caar reply-to)
|
||||
(caar (plist-get msg :from))))
|
||||
(email (cons name organizer)))
|
||||
(reply-to (car (plist-get msg :reply-to)))
|
||||
(from (car (plist-get msg :from)))
|
||||
(name (or (plist-get reply-to :name)
|
||||
(plist-get from :name))))
|
||||
;; Add :reply-to field when incomplete or absent
|
||||
(unless (or (string= organizer "")
|
||||
(mu4e~icalendar-has-email organizer reply-to))
|
||||
(plist-put ical-msg :reply-to (cons email reply-to))))
|
||||
(plist-put ical-msg :subject
|
||||
(concat (capitalize (symbol-name status))
|
||||
": " (gnus-icalendar-event:summary event)))
|
||||
(plist-put ical-msg :reply-to `((:name ,name :email ,organizer))))
|
||||
(plist-put ical-msg :subject
|
||||
(concat (capitalize (symbol-name status))
|
||||
": " (gnus-icalendar-event:summary event))))
|
||||
(mu4e~compose-handler
|
||||
'reply ical-msg
|
||||
`((:buffer-name ,ical-name
|
||||
|
|
Loading…
Reference in New Issue