RSVP handling.
authorJan Tatarik <jan.tatarik@gmail.com>
Tue, 19 Nov 2013 23:00:31 +0000 (00:00 +0100)
committerAdam Sjøgren <asjo@koldfront.dk>
Thu, 21 Nov 2013 22:39:56 +0000 (23:39 +0100)
lisp/ChangeLog
lisp/gnus-icalendar.el

index b77fec6..b03f04a 100644 (file)
@@ -1,3 +1,8 @@
+2013-11-21  Jan Tatarik <jan.tatarik@gmail.com>
+
+       * gnus-icalendar.el (gnus-icalendar-additional-identities): New.
+       (gnus-icalendar-identities): Support additional-identities.
+
 2013-11-21  Jan Tatarik <jan.tatarik@gmail.com>
 
        * gnus-icalendar.el (gnus-icalendar-event:org-timestamp): Fix
index 5fbb6e7..56c56f3 100644 (file)
@@ -649,6 +649,22 @@ is searched."
   :type '(string)
   :group 'gnus-icalendar)
 
+(defcustom gnus-icalendar-additional-identities nil
+  "We need to know your identity to make replies to calendar requests work.
+
+Gnus will only offer you the Accept/Tentative/Decline buttons for
+calendar events if any of your identities matches at least one
+RSVP participant.
+
+Your identity is guessed automatically from the variables `user-full-name',
+`user-mail-address', and `gnus-ignored-from-addresses'.
+
+If you need even more aliases you can define them here.  It really
+only makes sense to define names or email addresses."
+
+  :type '(repeat string)
+  :group 'gnus-icalendar)
+
 (make-variable-buffer-local
  (defvar gnus-icalendar-reply-status nil))
 
@@ -662,8 +678,9 @@ is searched."
   (apply #'append
          (mapcar (lambda (x) (if (listp x) x (list x)))
                  (list user-full-name (regexp-quote user-mail-address)
-                       ; NOTE: this one can be a list
-                       gnus-ignored-from-addresses))))
+                       ; NOTE: these can be lists
+                       gnus-ignored-from-addresses ; already regexp-quoted
+                       (mapcar #'regexp-quote gnus-icalendar-additional-identities)))))
 
 ;; TODO: make the template customizable
 (defmethod gnus-icalendar-event->gnus-calendar ((event gnus-icalendar-event) &optional reply-status)