Changed some thngs to be compatible with webfinger.org, still *very preliminary*
authorJoar Wandborg <git@wandborg.com>
Wed, 14 Dec 2011 23:58:14 +0000 (00:58 +0100)
committerJoar Wandborg <git@wandborg.com>
Wed, 14 Dec 2011 23:58:14 +0000 (00:58 +0100)
mediagoblin/templates/mediagoblin/webfinger/xrd.xml
mediagoblin/webfinger/views.py

index 2ef9b8146b0b2d9869596a6c12082e5f81a144c1..796de89f9fe56a2d8b14bc3219e888e06ad5d986 100644 (file)
@@ -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/" />
index f6294da9efb025de0e32639698571a72daf7f511..7cbd09131d49c13504a30bf1ace4a685433b0089 100644 (file)
@@ -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)})