summaryrefslogtreecommitdiff
path: root/plugins/OStatus/lib/discovery.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/OStatus/lib/discovery.php')
-rw-r--r--plugins/OStatus/lib/discovery.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/OStatus/lib/discovery.php b/plugins/OStatus/lib/discovery.php
index 6d245677a..44fad62fb 100644
--- a/plugins/OStatus/lib/discovery.php
+++ b/plugins/OStatus/lib/discovery.php
@@ -154,12 +154,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);