]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/comments.pm
Merge remote-tracking branch 'remotes/fmarier/libravatar-in-comments'
[git.ikiwiki.info.git] / IkiWiki / Plugin / comments.pm
index 00ab1c8bdacda84e0ee12279074e14110e0f26d3..bccb977e3b3e06e21175575d587727c327778e55 100755 (executable)
@@ -192,10 +192,11 @@ sub preprocess {
                 eval 'use Libravatar::URL';
 
                 if (! $@) {
-                    my $email = IkiWiki::userinfo_get($commentuser, 'email');
-
-                    if (defined $email) {
-                        $commentauthoravatar = libravatar_url(email => $email);
+                    if (defined $commentopenid) {
+                        $commentauthoravatar = libravatar_url(openid => $commentopenid, https => $ENV{HTTPS});
+                    }
+                    elsif (my $email = IkiWiki::userinfo_get($commentuser, 'email')) {
+                        $commentauthoravatar = libravatar_url(email => $email, https => $ENV{HTTPS});
                     }
                 }
        }