From: Joar Wandborg Date: Wed, 14 Dec 2011 23:58:14 +0000 (+0100) Subject: Changed some thngs to be compatible with webfinger.org, still *very preliminary* X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=830a78cdfbb8fc1ee8af770a299f59f26e918aa0;p=mediagoblin.git Changed some thngs to be compatible with webfinger.org, still *very preliminary* --- 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)})