function connectWebfinger($acct)
{
- $w = new Webfinger;
+ $disco = new Discovery;
- $result = $w->lookup($acct);
+ $result = $disco->lookup($acct);
if (!$result) {
$this->clientError(_m("Couldn't look up OStatus account profile."));
}
function handle()
{
- $acct = Webfinger::normalize($this->uri);
+ $acct = Discovery::normalize($this->uri);
$xrd = new XRD();
$xrd->subject = $this->uri;
$xrd->alias[] = common_profile_url($nick);
- $xrd->links[] = array('rel' => Webfinger::PROFILEPAGE,
+ $xrd->links[] = array('rel' => Discovery::PROFILEPAGE,
'type' => 'text/html',
'href' => common_profile_url($nick));
- $xrd->links[] = array('rel' => Webfinger::UPDATESFROM,
+ $xrd->links[] = array('rel' => Discovery::UPDATESFROM,
'href' => common_local_url('ApiTimelineUser',
array('id' => $this->user->id,
'format' => 'atom')),
// Now, try some discovery
- $wf = new Webfinger();
+ $disco = new Discovery();
- $result = $wf->lookup($addr);
+ $result = $disco->lookup($addr);
if (!$result) {
return null;
foreach ($result->links as $link) {
switch ($link['rel']) {
- case Webfinger::PROFILEPAGE:
+ case Discovery::PROFILEPAGE:
$profileUrl = $link['href'];
break;
case 'salmon':
$salmonEndpoint = $link['href'];
break;
- case Webfinger::UPDATESFROM:
+ case Discovery::UPDATESFROM:
$feedUrl = $link['href'];
break;
default: