# HG changeset patch
# User Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
# Date 1320253201 25200
# Node ID 360186772aa3b923e458b7343c003a73cd0fde18
# Parent  42d3f454d4b4cf7193c5e1a78f8423ef54312385
Don’t hardcode avatars URL.

diff --git a/atom.js b/atom.js
--- a/atom.js
+++ b/atom.js
@@ -67,7 +67,7 @@ parsers[ns.atom] = function(id, xml) {
 				cite.appendChild(a);
 
 				var img = document.createElementNS(ns.xhtml, 'img');
-				img.src = 'http://eldonilo.linkmauve.fr/avatar/' + atomJID.bare;
+				img.src = config.avatarRoot + atomJID.bare;
 				aside.appendChild(img);
 			} else
 				cite.appendChild(document.createTextNode(atomName));
diff --git a/configuration.js b/configuration.js
--- a/configuration.js
+++ b/configuration.js
@@ -30,6 +30,7 @@ config.defaultNode = 'psgxs.linkmauve.fr
 // Root of the webservice, and Atom HTTP service.
 config.webRoot = '/blog/';
 config.atomRoot = '/atom/';
+config.avatarRoot = '/avatar/';
 
 // These are the host and the port on which the web service will
 // listen.  If you want IPv4 connection only, instead of both IPv4 and
diff --git a/server.js b/server.js
--- a/server.js
+++ b/server.js
@@ -171,7 +171,8 @@ var parseAtom = function(atom, id, jid) 
 		try{
 			var uri = author.getChild('uri', ns.atom).getText();
 			footer.c('cite').c('a', {href: uri}).t(name).up();
-			avatar.attrs.src = '/avatar/' + uri.substring(5);
+			avatar.attrs.src = config.avatarRoot + uri.substring(5);
+			avatar.attrs.alt = uri.substring(5);
 		} catch (e) {
 			footer.c('cite').t(name);
 		}