use new dedicated hcard method for Webfinger profile

This commit is contained in:
Evan Prodromou 2010-02-25 18:45:08 -05:00
parent 76216af806
commit 6578e0e1af

View File

@ -68,7 +68,7 @@ class WebfingerAction extends Action
// hCard // hCard
$xrd->links[] = array('rel' => 'http://microformats.org/profile/hcard', $xrd->links[] = array('rel' => 'http://microformats.org/profile/hcard',
'type' => 'text/html', 'type' => 'text/html',
'href' => common_profile_url($nick)); 'href' => common_local_url('hcard', array('nickname' => $nick)));
// XFN // XFN
$xrd->links[] = array('rel' => 'http://gmpg.org/xfn/11', $xrd->links[] = array('rel' => 'http://gmpg.org/xfn/11',
@ -78,8 +78,8 @@ class WebfingerAction extends Action
$xrd->links[] = array('rel' => 'describedby', $xrd->links[] = array('rel' => 'describedby',
'type' => 'application/rdf+xml', 'type' => 'application/rdf+xml',
'href' => common_local_url('foaf', 'href' => common_local_url('foaf',
array('nickname' => $nick))); array('nickname' => $nick)));
$salmon_url = common_local_url('salmon', $salmon_url = common_local_url('salmon',
array('id' => $this->user->id)); array('id' => $this->user->id));
@ -93,10 +93,10 @@ class WebfingerAction extends Action
$magickey = new Magicsig(); $magickey = new Magicsig();
$magickey->generate(); $magickey->generate();
} }
$xrd->links[] = array('rel' => Magicsig::PUBLICKEYREL, $xrd->links[] = array('rel' => Magicsig::PUBLICKEYREL,
'href' => 'data:application/magic-public-key;'. $magickey->keypair); 'href' => 'data:application/magic-public-key;'. $magickey->keypair);
// TODO - finalize where the redirect should go on the publisher // TODO - finalize where the redirect should go on the publisher
$url = common_local_url('ostatussub') . '?profile={uri}'; $url = common_local_url('ostatussub') . '?profile={uri}';
$xrd->links[] = array('rel' => 'http://ostatus.org/schema/1.0/subscribe', $xrd->links[] = array('rel' => 'http://ostatus.org/schema/1.0/subscribe',