|
|
|
@ -31,13 +31,9 @@ class Webfinger {
|
|
|
|
|
|
|
|
|
|
public function generateAliases()
|
|
|
|
|
{
|
|
|
|
|
$host = parse_url(config('app.url'), PHP_URL_HOST);
|
|
|
|
|
$username = $this->user->username;
|
|
|
|
|
$url = $this->user->url();
|
|
|
|
|
|
|
|
|
|
$this->aliases = [
|
|
|
|
|
'acct:'.$username.'@'.$host,
|
|
|
|
|
$url
|
|
|
|
|
$this->user->url(),
|
|
|
|
|
$this->user->permalink()
|
|
|
|
|
];
|
|
|
|
|
return $this;
|
|
|
|
|
}
|
|
|
|
@ -55,24 +51,12 @@ class Webfinger {
|
|
|
|
|
[
|
|
|
|
|
'rel' => 'http://schemas.google.com/g/2010#updates-from',
|
|
|
|
|
'type' => 'application/atom+xml',
|
|
|
|
|
'href' => url("/users/{$user->username}.atom")
|
|
|
|
|
'href' => $user->permalink('.atom')
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'rel' => 'self',
|
|
|
|
|
'type' => 'application/activity+json',
|
|
|
|
|
'href' => $user->permalink()
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'rel' => 'magic-public-key',
|
|
|
|
|
'href' => null//$user->public_key
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'rel' => 'salmon',
|
|
|
|
|
'href' => $user->permalink('/salmon')
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'rel' => 'http://ostatus.org/schema/1.0/subscribe',
|
|
|
|
|
'href' => url('/main/ostatussub?profile={uri}')
|
|
|
|
|
]
|
|
|
|
|
];
|
|
|
|
|
return $this;
|
|
|
|
|