From 0f38dd4b1a525b2eca7657dc26b7d36d4844ff51 Mon Sep 17 00:00:00 2001 From: Christophe Troestler Date: Thu, 18 Apr 2019 17:06:34 +0200 Subject: [PATCH] =?UTF-8?q?mu4e=20(ical):=20Display=20ical=20buttons=20onl?= =?UTF-8?q?y=20when=20method=E2=88=88{REQUEST,PUBLISH}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mu4e/mu4e-icalendar.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mu4e/mu4e-icalendar.el b/mu4e/mu4e-icalendar.el index 3bc09217..fc7cb52b 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)