all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Philip K. <philip.kaludercic@fau.de>
Cc: 39965@debbugs.gnu.org
Subject: bug#39965: [PATCH] Add support for multiple gravatar-like services
Date: Tue, 17 Mar 2020 14:51:22 +0100	[thread overview]
Message-ID: <m2sgi7ay3p.fsf@gmail.com> (raw)
In-Reply-To: <ykgn1rq0k13k.fsf@fau.de> (Philip K.'s message of "Tue, 10 Mar 2020 10:31:27 +0100")

>>>>> On Tue, 10 Mar 2020 10:31:27 +0100, Philip K. <philip.kaludercic@fau.de> said:

    Philip> Sorry for the delay, I hope the commit message is ok now.

Sorry for my delay in getting back to you. I have one question:

    Philip> +(defun gravatar--service-libravatar (addr)
    Philip> +  "Find domain that hosts avatars for email address ADDR."
    Philip> +  ;; implements https://wiki.libravatar.org/api/
    Philip> +  (require 'dns)
    Philip> +  (let* ((domain (save-match-data
    Philip> +                   (unless (string-match ".+@\\(.+\\)" addr)
    Philip> +                     (error "%s is not an email address" addr))
    Philip> +                   (match-string 1 addr)))
    Philip> +         (result (dns-query (concat "_avatars._tcp." domain) 'SRV)))
    Philip> +    (if result
    Philip> +        (concat "http://" result "/address")
    Philip> +      "https://seccdn.libravatar.org/avatar")))

Here you do the SRV lookup for the TCP service, but I believe thereʼs
an HTTPS service type available as well. Could you look that up first,
then the TCP one, then fall back to the default libravatar URL?

Robert





  parent reply	other threads:[~2020-03-17 13:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87mu8ej1pg.fsf@bulbul>
2020-03-07  0:11 ` bug#39965: [PATCH] Add support for multiple gravatar-like services Philip K
2020-03-07  7:51   ` Eli Zaretskii
2020-03-09 10:39   ` Robert Pluim
     [not found]     ` <ykgnr1y1poro.fsf@fau.de>
2020-03-09 15:04       ` Robert Pluim
2020-03-09 15:10         ` Philip Kaludercic
2020-03-09 15:35           ` Robert Pluim
2020-03-09 23:53             ` Philip K.
2020-03-10  1:58               ` Noam Postavsky
2020-03-10  9:31   ` Philip K.
2020-03-11  7:38     ` Robert Pluim
2020-03-11  8:50       ` Philip Kaludercic
2020-03-11 16:09         ` Eli Zaretskii
2020-03-11 16:08       ` Eli Zaretskii
2020-03-11 17:00         ` Philip K.
2020-03-12  7:41           ` Robert Pluim
2020-03-17 13:51     ` Robert Pluim [this message]
2020-03-17 14:37       ` Philip K.
2020-03-24 17:00   ` Robert Pluim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2sgi7ay3p.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=39965@debbugs.gnu.org \
    --cc=philip.kaludercic@fau.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.