diff options
author | Joar Wandborg <git@wandborg.com> | 2011-12-15 00:58:14 +0100 |
---|---|---|
committer | Joar Wandborg <git@wandborg.com> | 2011-12-15 00:58:14 +0100 |
commit | 830a78cdfbb8fc1ee8af770a299f59f26e918aa0 (patch) | |
tree | f0bd77b85ca2b8a21177e094fb7531026103d6a9 | |
parent | 9c1c6c2a61ad23d5b68eb3794e81c5bee7c7cd46 (diff) | |
download | mediagoblin-830a78cdfbb8fc1ee8af770a299f59f26e918aa0.tar.lz mediagoblin-830a78cdfbb8fc1ee8af770a299f59f26e918aa0.tar.xz mediagoblin-830a78cdfbb8fc1ee8af770a299f59f26e918aa0.zip |
Changed some thngs to be compatible with webfinger.org, still *very preliminary*
-rw-r--r-- | mediagoblin/templates/mediagoblin/webfinger/xrd.xml | 3 | ||||
-rw-r--r-- | 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 @@ <Subject>{{ uri }}</Subject> <Alias>http://{{ request.host }}/u/{{ username }}</Alias> + <Link rel='http://microformats.org/profile/hcard' + href='http://{{ request.host }}/u/{{ username }}' /> + <Link rel="http://schemas.google.com/g/2010#updates-from" type="application/atom+xml" href="http://{{ request.host }}/u/{{ username }}/atom/" /> 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)}) |