moving references to Webfinger to Discovery
This commit is contained in:
parent
bd90ef9f66
commit
5ae64a7adb
@ -131,9 +131,9 @@ class OStatusInitAction extends Action
|
|||||||
|
|
||||||
function connectWebfinger($acct)
|
function connectWebfinger($acct)
|
||||||
{
|
{
|
||||||
$w = new Webfinger;
|
$disco = new Discovery;
|
||||||
|
|
||||||
$result = $w->lookup($acct);
|
$result = $disco->lookup($acct);
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
$this->clientError(_m("Couldn't look up OStatus account profile."));
|
$this->clientError(_m("Couldn't look up OStatus account profile."));
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ class WebfingerAction extends Action
|
|||||||
|
|
||||||
function handle()
|
function handle()
|
||||||
{
|
{
|
||||||
$acct = Webfinger::normalize($this->uri);
|
$acct = Discovery::normalize($this->uri);
|
||||||
|
|
||||||
$xrd = new XRD();
|
$xrd = new XRD();
|
||||||
|
|
||||||
@ -55,11 +55,11 @@ class WebfingerAction extends Action
|
|||||||
|
|
||||||
$xrd->subject = $this->uri;
|
$xrd->subject = $this->uri;
|
||||||
$xrd->alias[] = common_profile_url($nick);
|
$xrd->alias[] = common_profile_url($nick);
|
||||||
$xrd->links[] = array('rel' => Webfinger::PROFILEPAGE,
|
$xrd->links[] = array('rel' => Discovery::PROFILEPAGE,
|
||||||
'type' => 'text/html',
|
'type' => 'text/html',
|
||||||
'href' => common_profile_url($nick));
|
'href' => common_profile_url($nick));
|
||||||
|
|
||||||
$xrd->links[] = array('rel' => Webfinger::UPDATESFROM,
|
$xrd->links[] = array('rel' => Discovery::UPDATESFROM,
|
||||||
'href' => common_local_url('ApiTimelineUser',
|
'href' => common_local_url('ApiTimelineUser',
|
||||||
array('id' => $this->user->id,
|
array('id' => $this->user->id,
|
||||||
'format' => 'atom')),
|
'format' => 'atom')),
|
||||||
|
@ -1328,9 +1328,9 @@ class Ostatus_profile extends Memcached_DataObject
|
|||||||
|
|
||||||
// Now, try some discovery
|
// Now, try some discovery
|
||||||
|
|
||||||
$wf = new Webfinger();
|
$disco = new Discovery();
|
||||||
|
|
||||||
$result = $wf->lookup($addr);
|
$result = $disco->lookup($addr);
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
return null;
|
return null;
|
||||||
@ -1338,13 +1338,13 @@ class Ostatus_profile extends Memcached_DataObject
|
|||||||
|
|
||||||
foreach ($result->links as $link) {
|
foreach ($result->links as $link) {
|
||||||
switch ($link['rel']) {
|
switch ($link['rel']) {
|
||||||
case Webfinger::PROFILEPAGE:
|
case Discovery::PROFILEPAGE:
|
||||||
$profileUrl = $link['href'];
|
$profileUrl = $link['href'];
|
||||||
break;
|
break;
|
||||||
case 'salmon':
|
case 'salmon':
|
||||||
$salmonEndpoint = $link['href'];
|
$salmonEndpoint = $link['href'];
|
||||||
break;
|
break;
|
||||||
case Webfinger::UPDATESFROM:
|
case Discovery::UPDATESFROM:
|
||||||
$feedUrl = $link['href'];
|
$feedUrl = $link['href'];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user