diff options
author | James Walker <walkah@walkah.net> | 2010-03-13 18:35:00 -0500 |
---|---|---|
committer | James Walker <walkah@walkah.net> | 2010-03-13 18:35:00 -0500 |
commit | 85cf90cf0fb613bab38ce8e0142544a044fe0d1d (patch) | |
tree | 37cf2a7ed118ff261f41b3b0afe1e07e336175c5 /plugins/OStatus/lib | |
parent | 99ca84e68ed8cce97caa605fad04110d420c41b3 (diff) |
Performing & allowing host-meta discovery by http url (in addition to webfinger acct)
Diffstat (limited to 'plugins/OStatus/lib')
-rw-r--r-- | plugins/OStatus/lib/discovery.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/OStatus/lib/discovery.php b/plugins/OStatus/lib/discovery.php index f8449b309..df2fea64f 100644 --- a/plugins/OStatus/lib/discovery.php +++ b/plugins/OStatus/lib/discovery.php @@ -157,12 +157,13 @@ class Discovery_LRDD_Host_Meta implements Discovery_LRDD { public function discover($uri) { - if (!Discovery::isWebfinger($uri)) { - return false; + if (Discovery::isWebfinger($uri)) { + // We have a webfinger acct: - start with host-meta + list($name, $domain) = explode('@', $uri); + } else { + $domain = parse_url($uri, PHP_URL_HOST); } - - // We have a webfinger acct: - start with host-meta - list($name, $domain) = explode('@', $uri); + $url = 'http://'. $domain .'/.well-known/host-meta'; $xrd = Discovery::fetchXrd($url); |