Bugfix: The request process from DFRN hadn't worked anymore since the last pull request

This commit is contained in:
Michael Vogel 2016-01-01 17:49:07 +01:00
parent 9d4d29ad9e
commit 2ed3ae1aab
1 changed files with 11 additions and 11 deletions

View File

@ -441,25 +441,25 @@ function dfrn_request_post(&$a) {
// Next send an email verify form to the requestor. // Next send an email verify form to the requestor.
} } else {
else {
// Detect the network // Detect the network
$data = probe_url($url); $data = probe_url($url);
$network = $data["network"]; $network = $data["network"];
// Use the detected address - if present
if ($data["addr"] != "")
$url = $data["addr"];
// Canonicalise email-style profile locator // Canonicalise email-style profile locator
$url = webfinger_dfrn($url,$hcard); $url = webfinger_dfrn($url,$hcard);
if (substr($url,0,5) === 'stat:') if (substr($url,0,5) === 'stat:') {
$url = substr($url,5);
if (($url == "") AND ($network === NETWORK_DIASPORA)) // Every time we detect the remote subscription we define this as OStatus.
$url = $data["baseurl"]."/people?q={uri}"; // 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;
$url = substr($url,5);
} else
$network = NETWORK_DFRN;
} }
logger('dfrn_request: url: ' . $url); logger('dfrn_request: url: ' . $url);