]> git.mxchange.org Git - friendica.git/blobdiff - mod/nodeinfo.php
Merge pull request #2067 from annando/1511-optimize-sql
[friendica.git] / mod / nodeinfo.php
index d2ef9179080ba835bbef6d526ffc468c514b26ca..f013c9084ff9c813ae18a91d0edf239451f890fd 100644 (file)
@@ -10,8 +10,8 @@ function nodeinfo_wellknown(&$a) {
                http_status_exit(404);
                killme();
        }
-       $nodeinfo = array("links" => array("rel" => "http://nodeinfo.diaspora.software/ns/schema/1.0",
-                                       "href" => $a->get_baseurl()."/nodeinfo/1.0"));
+       $nodeinfo = array("links" => array(array("rel" => "http://nodeinfo.diaspora.software/ns/schema/1.0",
+                                       "href" => $a->get_baseurl()."/nodeinfo/1.0")));
 
        header('Content-type: application/json; charset=utf-8');
        echo json_encode($nodeinfo, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
@@ -67,10 +67,11 @@ function nodeinfo_init(&$a){
 
        $nodeinfo["metadata"] = array("nodeName" => $a->config["sitename"]);
 
-       if (nodeinfo_plugin_enabled("appnet") OR nodeinfo_plugin_enabled("buffer")) {
+       if (nodeinfo_plugin_enabled("appnet"))
                $nodeinfo["services"]["inbound"][] = "appnet";
+
+       if (nodeinfo_plugin_enabled("appnet") OR nodeinfo_plugin_enabled("buffer"))
                $nodeinfo["services"]["outbound"][] = "appnet";
-       }
 
        if (nodeinfo_plugin_enabled("blogger"))
                $nodeinfo["services"]["outbound"][] = "blogger";
@@ -120,14 +121,18 @@ function nodeinfo_init(&$a){
        if (nodeinfo_plugin_enabled("tumblr"))
                $nodeinfo["services"]["outbound"][] = "tumblr";
 
-       if (nodeinfo_plugin_enabled("twitter"))
+       if (nodeinfo_plugin_enabled("twitter") OR nodeinfo_plugin_enabled("buffer"))
                $nodeinfo["services"]["outbound"][] = "twitter";
 
        if (nodeinfo_plugin_enabled("wppost"))
                $nodeinfo["services"]["outbound"][] = "wordpress";
 
+       $nodeinfo["metadata"]["protocols"] = $nodeinfo["protocols"];
+       $nodeinfo["metadata"]["protocols"]["outbound"][] = "atom1.0";
+       $nodeinfo["metadata"]["protocols"]["inbound"][] = "atom1.0";
+       $nodeinfo["metadata"]["protocols"]["inbound"][] = "rss2.0";
+
        $nodeinfo["metadata"]["services"] = $nodeinfo["services"];
-       $nodeinfo["metadata"]["services"]["inbound"][] = "feed";
 
        if (nodeinfo_plugin_enabled("twitter"))
                $nodeinfo["metadata"]["services"]["inbound"][] = "twitter";