summaryrefslogtreecommitdiff
path: root/mu4e
diff options
context:
space:
mode:
authorChristophe Troestler <Christophe.Troestler@umons.ac.be>2019-04-18 17:06:34 +0200
committerChristophe Troestler <Christophe.Troestler@umons.ac.be>2019-07-13 14:07:34 +0200
commit0f38dd4b1a525b2eca7657dc26b7d36d4844ff51 (patch)
treef0724a29632e635568777620fe4a0d96d22c4c19 /mu4e
parent66e514c58480677c7e6268f59683fa7a2e81698f (diff)
mu4e (ical): Display ical buttons only when method∈{REQUEST,PUBLISH}
Diffstat (limited to 'mu4e')
-rw-r--r--mu4e/mu4e-icalendar.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/mu4e/mu4e-icalendar.el b/mu4e/mu4e-icalendar.el
index 3bc0921..fc7cb52 100644
--- a/mu4e/mu4e-icalendar.el
+++ b/mu4e/mu4e-icalendar.el
@@ -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)