(defcustom gnus-notifications-timeout nil
"Timeout used for notifications sent via `notifications-notify'."
(defcustom gnus-notifications-timeout nil
"Timeout used for notifications sent via `notifications-notify'."
(gnus-fetch-group group (list article)))))))
(defun gnus-notifications-notify (from subject photo-file)
"Send a notification about a new mail.
Return a notification id if any, or t on success."
(if (fboundp 'notifications-notify)
(gnus-fetch-group group (list article)))))))
(defun gnus-notifications-notify (from subject photo-file)
"Send a notification about a new mail.
Return a notification id if any, or t on success."
(if (fboundp 'notifications-notify)
(let ((google-photo (when (and gnus-notifications-use-google-contacts
(fboundp 'google-contacts-get-photo))
(ignore-errors
(let ((google-photo (when (and gnus-notifications-use-google-contacts
(fboundp 'google-contacts-get-photo))
(ignore-errors
(or (mail-fetch-field "From") "")))
(address (cadr address-components)))
;; Ignore mails from ourselves
(or (mail-fetch-field "From") "")))
(address (cadr address-components)))
;; Ignore mails from ourselves
(let* ((photo-file (gnus-notifications-get-photo-file address))
(notification-id (gnus-notifications-notify
(or (car address-components) address)
(let* ((photo-file (gnus-notifications-get-photo-file address))
(notification-id (gnus-notifications-notify
(or (car address-components) address)