X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnodeinfo.php;h=f013c9084ff9c813ae18a91d0edf239451f890fd;hb=14e17b944fb992317ccccdfeff9b9906b15ef44f;hp=a816a43efa2c0fde1a65dc50c71820ecf39a28e0;hpb=2a676ee312f4c59c42afb894f92db0629337800f;p=friendica.git diff --git a/mod/nodeinfo.php b/mod/nodeinfo.php index a816a43efa..f013c9084f 100644 --- a/mod/nodeinfo.php +++ b/mod/nodeinfo.php @@ -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,12 +121,17 @@ 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"]; if (nodeinfo_plugin_enabled("twitter"))