From: Michael Date: Tue, 22 Aug 2017 10:18:07 +0000 (+0000) Subject: Our user feeds now look more like OStatus X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e607a9dcda71f72f8240d1772ee4a627382e7bd5;p=friendica.git Our user feeds now look more like OStatus --- diff --git a/mod/_well_known.php b/mod/_well_known.php index 45c1da494c..d75f43fbe0 100644 --- a/mod/_well_known.php +++ b/mod/_well_known.php @@ -5,6 +5,7 @@ use Friendica\Core\Config; require_once("mod/hostxrd.php"); require_once("mod/nodeinfo.php"); +require_once("mod/xrd.php"); function _well_known_init(App $a) { if ($a->argc > 1) { @@ -18,6 +19,9 @@ function _well_known_init(App $a) { case "nodeinfo": nodeinfo_wellknown($a); break; + case "webfinger": + xrd_init($a); + break; } } http_status_exit(404); diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index ba845e41f4..f02539b005 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -5,6 +5,7 @@ use Friendica\App; require_once('include/items.php'); require_once('include/auth.php'); require_once('include/dfrn.php'); +require_once('include/ostatus.php'); function dfrn_poll_init(App $a) { $dfrn_id = ((x($_GET,'dfrn_id')) ? $_GET['dfrn_id'] : ''); @@ -17,6 +18,14 @@ function dfrn_poll_init(App $a) { $perm = ((x($_GET,'perm')) ? $_GET['perm'] : 'r'); $quiet = ((x($_GET,'quiet')) ? true : false); + // Possibly it is an OStatus compatible server that requests a user feed + if (($a->argc > 1) && ($dfrn_id == '') && !strstr($_SERVER["HTTP_USER_AGENT"], 'Friendica')) { + $nickname = $a->argv[1]; + header("Content-type: application/atom+xml"); + echo ostatus::feed($a, $nickname, $last_update); + killme(); + } + $direction = (-1); diff --git a/mod/xrd.php b/mod/xrd.php index bfb889258c..acde4d9f35 100644 --- a/mod/xrd.php +++ b/mod/xrd.php @@ -8,6 +8,10 @@ function xrd_init(App $a) { $uri = urldecode(notags(trim($_GET['uri']))); + if ($uri == "") { + $uri = urldecode(notags(trim($_GET['resource']))); + } + if(substr($uri,0,4) === 'http') { $acct = false; $name = basename($uri);