X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FXrd.php;h=d2813cc270ae0d39c479bc79e9cb4cd348651aea;hb=fc283ab92858238a5a55f24b1d1650bb72068b7d;hp=be6a3bf9c58519341a917f725d20f19258f91e7c;hpb=122ad0af14f046c2462a03fe33967dc41abfc8b5;p=friendica.git diff --git a/src/Module/Xrd.php b/src/Module/Xrd.php index be6a3bf9c5..d2813cc270 100644 --- a/src/Module/Xrd.php +++ b/src/Module/Xrd.php @@ -1,6 +1,6 @@ argv[0] == 'xrd') { + if (DI::args()->getArgv()[0] == 'xrd') { if (empty($_GET['uri'])) { return; } @@ -132,6 +130,25 @@ class Xrd extends BaseModule 'rel' => 'http://ostatus.org/schema/1.0/subscribe', 'template' => DI::baseUrl()->get() . '/follow?url={uri}', ], + [ + 'rel' => ActivityNamespace::FEED, + 'type' => 'application/atom+xml', + 'href' => $owner['poll'] ?? DI::baseUrl()->get(), + ], + [ + 'rel' => 'salmon', + 'href' => DI::baseUrl()->get() . '/salmon/' . $owner['nickname'], + ], + [ + 'rel' => 'http://microformats.org/profile/hcard', + 'type' => 'text/html', + 'href' => DI::baseUrl()->get() . '/hcard/' . $owner['nickname'], + ], + [ + 'rel' => 'http://joindiaspora.com/seed_location', + 'type' => 'text/html', + 'href' => DI::baseUrl()->get(), + ], ] ]; header('Access-Control-Allow-Origin: *'); @@ -183,7 +200,7 @@ class Xrd extends BaseModule [ 'rel' => 'http://webfinger.net/rel/avatar', 'type' => $avatar['type'], - 'href' => $owner['photo'], + 'href' => Contact::getAvatarUrlForUrl($owner['url'], $owner['uid']), ], [ 'rel' => 'http://joindiaspora.com/seed_location', @@ -239,7 +256,7 @@ class Xrd extends BaseModule '$hcard_url' => $baseURL . '/hcard/' . $owner['nickname'], '$atom' => $owner['poll'], '$poco_url' => $owner['poco'], - '$photo' => $owner['photo'], + '$photo' => Contact::getAvatarUrlForUrl($owner['url'], $owner['uid']), '$type' => $avatar['type'], '$salmon' => $baseURL . '/salmon/' . $owner['nickname'], '$salmen' => $baseURL . '/salmon/' . $owner['nickname'] . '/mention',