X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FOStatus%2Factions%2Fhostmeta.php;h=8ca07f9165535e493d52eb3b598ca59057051fac;hb=10f72f62af400f9b0edc6bc8a3f6a850395e3699;hp=850b8a0fe89d47bab373327abab797db13dbc5b9;hpb=b7037a49af97db73b3adc77d3f78ffb0805c7c68;p=quix0rs-gnu-social.git diff --git a/plugins/OStatus/actions/hostmeta.php b/plugins/OStatus/actions/hostmeta.php index 850b8a0fe8..8ca07f9165 100644 --- a/plugins/OStatus/actions/hostmeta.php +++ b/plugins/OStatus/actions/hostmeta.php @@ -31,12 +31,17 @@ class HostMetaAction extends Action { parent::handle(); - $w = new Webfinger(); - - $domain = common_config('site', 'server'); - $url = common_local_url('webfinger'); + $url = common_local_url('userxrd'); $url.= '?uri={uri}'; - print $w->getHostMeta($domain, $url); + + $xrd = new XRD(); + $xrd->host = $domain; + $xrd->links[] = array('rel' => Discovery::LRDD_REL, + 'template' => $url, + 'title' => array('Resource Descriptor')); + + header('Content-type: application/xrd+xml'); + print $xrd->toXML(); } }