mu4e (ical): Display ical buttons only when method∈{REQUEST,PUBLISH}

This commit is contained in:
Christophe Troestler 2019-04-18 17:06:34 +02:00
parent 66e514c584
commit 0f38dd4b1a
1 changed files with 5 additions and 3 deletions

View File

@ -24,9 +24,11 @@
((event gnus-icalendar-event) handle)
(if (and (boundp 'mu4e~view-rendering)
(gnus-icalendar-event:rsvp event))
`(("Accept" mu4e-icalendar-reply (,handle accepted ,event))
("Tentative" mu4e-icalendar-reply (,handle tentative ,event))
("Decline" mu4e-icalendar-reply (,handle declined ,event)))
(let ((method (gnus-icalendar-event:method event)))
(when (or (string= method "REQUEST") (string= method "PUBLISH"))
`(("Accept" mu4e-icalendar-reply (,handle accepted ,event))
("Tentative" mu4e-icalendar-reply (,handle tentative ,event))
("Decline" mu4e-icalendar-reply (,handle declined ,event)))))
(cl-call-next-method event handle))))
(defun mu4e-icalendar-reply (data)