X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdfrn_request.php;h=2741ad59b4f2c1f3cc66eb4a064792df5120dd5c;hb=2a4ebaa438c0e4c84e20d2567d708e472a7c7192;hp=1b1bf4e05689e0c7f6b974930a82e2023d840786;hpb=cf86162a08a71435865803b40dd283fc0b83427d;p=friendica.git diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index 1b1bf4e056..2741ad59b4 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -10,6 +10,7 @@ */ require_once('include/enotify.php'); +require_once('include/Scrape.php'); if(! function_exists('dfrn_request_init')) { function dfrn_request_init(&$a) { @@ -112,8 +113,6 @@ function dfrn_request_post(&$a) { * Scrape the other site's profile page to pick up the dfrn links, key, fn, and photo */ - require_once('include/Scrape.php'); - $parms = scrape_dfrn($dfrn_url); if(! count($parms)) { @@ -441,25 +440,25 @@ function dfrn_request_post(&$a) { // Next send an email verify form to the requestor. - } - - else { + } else { // Detect the network $data = probe_url($url); $network = $data["network"]; - // Use the detected address - if present - if ($data["addr"] != "") - $url = $data["addr"]; - // Canonicalise email-style profile locator $url = webfinger_dfrn($url,$hcard); - if (substr($url,0,5) === 'stat:') - $url = substr($url,5); + if (substr($url,0,5) === 'stat:') { + + // Every time we detect the remote subscription we define this as OStatus. + // We do this even if it is not OStatus. + // we only need to pass this through another section of the code. + if ($network != NETWORK_DIASPORA) + $network = NETWORK_OSTATUS; - if (($url == "") AND ($network === NETWORK_DIASPORA)) - $url = $data["baseurl"]."/people?q={uri}"; + $url = substr($url,5); + } else + $network = NETWORK_DFRN; } logger('dfrn_request: url: ' . $url);