]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Xrd.php
Remove direct calls to App->user
[friendica.git] / src / Module / Xrd.php
index d63fcb5eeb382a04f41cac88967614c80783b6f5..d2813cc270ae0d39c479bc79e9cb4cd348651aea 100644 (file)
@@ -40,10 +40,8 @@ class Xrd extends BaseModule
 {
        public static function rawContent(array $parameters = [])
        {
-               $app = DI::app();
-
                // @TODO: Replace with parameter from router
-               if ($app->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: *');