]> git.mxchange.org Git - friendica.git/blobdiff - mod/_well_known.php
Improve Console/Config display for array values
[friendica.git] / mod / _well_known.php
index 25289171f67f3f9f4965c7b80acda5b3dd38d66a..407fc756a931fef7cfe0a39adc79816def46b1b6 100644 (file)
@@ -46,8 +46,10 @@ function wk_social_relay()
                $server_tags = Config::get('system', 'relay_server_tags');
                $tagitems = explode(",", $server_tags);
 
+               /// @todo Check if it was better to use "strtolower" on the tags
                foreach ($tagitems AS $tag) {
-                       $tags[trim($tag, "# ")] = trim($tag, "# ");
+                       $tag = trim($tag, "# ");
+                       $tags[$tag] = $tag;
                }
 
                if (Config::get('system', 'relay_user_tags')) {
@@ -62,13 +64,17 @@ function wk_social_relay()
 
        $taglist = [];
        foreach ($tags AS $tag) {
-               $taglist[] = $tag;
+               if (!empty($tag)) {
+                       $taglist[] = $tag;
+               }
        }
 
        $relay = [
-               "subscribe" => $subscribe,
-               "scope" => $scope,
-               "tags" => $taglist
+               'subscribe' => $subscribe,
+               'scope' => $scope,
+               'tags' => $taglist,
+               'protocols' => ['diaspora' => ['receive' => System::baseUrl() . '/receive/public'],
+                       'dfrn' => ['receive' => System::baseUrl() . '/dfrn_notify']]
        ];
 
        header('Content-type: application/json; charset=utf-8');