From 830a78cdfbb8fc1ee8af770a299f59f26e918aa0 Mon Sep 17 00:00:00 2001 From: Joar Wandborg Date: Thu, 15 Dec 2011 00:58:14 +0100 Subject: [PATCH] Changed some thngs to be compatible with webfinger.org, still *very preliminary* --- mediagoblin/templates/mediagoblin/webfinger/xrd.xml | 3 +++ mediagoblin/webfinger/views.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mediagoblin/templates/mediagoblin/webfinger/xrd.xml b/mediagoblin/templates/mediagoblin/webfinger/xrd.xml index 2ef9b814..796de89f 100644 --- a/mediagoblin/templates/mediagoblin/webfinger/xrd.xml +++ b/mediagoblin/templates/mediagoblin/webfinger/xrd.xml @@ -20,6 +20,9 @@ {{ uri }} http://{{ request.host }}/u/{{ username }} + + diff --git a/mediagoblin/webfinger/views.py b/mediagoblin/webfinger/views.py index f6294da9..7cbd0913 100644 --- a/mediagoblin/webfinger/views.py +++ b/mediagoblin/webfinger/views.py @@ -42,5 +42,5 @@ def xrd(request): 'mediagoblin/webfinger/xrd.xml', {'request': request, 'username': re.search( - r'^acct:([^@]*)', - request.GET.get('uri')).group(1)}) + r'^(acct:)?([^@]*)', + request.GET.get('uri')).group(2)}) -- 2.25.1