From 6fe6191c2f59b3f50ac552799e121f2099c2e646 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Fri, 22 Apr 2016 23:58:06 +0200 Subject: [PATCH] Quickfix for Hubzilla systems with enabled OStatus addon --- include/Scrape.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/Scrape.php b/include/Scrape.php index 542adc22ab..09a8a2e79a 100644 --- a/include/Scrape.php +++ b/include/Scrape.php @@ -596,7 +596,7 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) { if($diaspora && $diaspora_base && $diaspora_guid) { $diaspora_notify = $diaspora_base.'receive/users/'.$diaspora_guid; - if($mode == PROBE_DIASPORA || ! $notify || ($notify == $diaspora_notify)) { + if($mode == PROBE_DIASPORA || !$notify || ($notify == $diaspora_notify)) { $notify = $diaspora_notify; $batch = $diaspora_base . 'receive/public' ; } @@ -846,6 +846,18 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) { if (($result2['network'] != "") AND ($result2['network'] != NETWORK_FEED)) $result = $result2; } + + // Quickfix for Hubzilla systems with enabled OStatus plugin + if (($result['network'] == NETWORK_DIASPORA) AND ($result["batch"] == "")) { + $result2 = probe_url($url, PROBE_DIASPORA, ++$level); + if ($result2['network'] == NETWORK_DIASPORA) { + $addr = $result["addr"]; + $result = $result2; + + if (($result["addr"] == "") AND ($addr != "")) + $result["addr"] = $addr; + } + } } // Only store into the cache if the value seems to be valid -- 2.39.5