forked from GNUsocial/gnu-social
use some constants and do some extra output in webfinger output
This commit is contained in:
parent
bd74f05a66
commit
912814fb7f
@ -37,7 +37,7 @@ class WebfingerAction extends Action
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle()
|
function handle()
|
||||||
{
|
{
|
||||||
$acct = Webfinger::normalize($this->uri);
|
$acct = Webfinger::normalize($this->uri);
|
||||||
@ -55,16 +55,22 @@ 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' => 'http://webfinger.net/rel/profile-page',
|
$xrd->links[] = array('rel' => Webfinger::PROFILEPAGE,
|
||||||
'type' => 'text/html',
|
'type' => 'text/html',
|
||||||
'href' => common_profile_url($nick));
|
'href' => common_profile_url($nick));
|
||||||
|
|
||||||
|
$xrd->links[] = array('rel' => Webfinger::UPDATESFROM,
|
||||||
|
'href' => common_local_url('ApiTimelineUser',
|
||||||
|
array('id' => $this->user->id,
|
||||||
|
'format' => 'atom')),
|
||||||
|
'type' => 'application/atom+xml');
|
||||||
|
|
||||||
$salmon_url = common_local_url('salmon',
|
$salmon_url = common_local_url('salmon',
|
||||||
array('id' => $this->user->id));
|
array('id' => $this->user->id));
|
||||||
|
|
||||||
$xrd->links[] = array('rel' => 'salmon',
|
$xrd->links[] = array('rel' => 'salmon',
|
||||||
'href' => $salmon_url);
|
'href' => $salmon_url);
|
||||||
|
|
||||||
// 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',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user