Remove address from name
This commit is contained in:
parent
7df60ae634
commit
6a486aa92b
1 changed files with 9 additions and 3 deletions
|
@ -652,7 +652,7 @@ class Probe
|
|||
$result = self::ostatus($webfinger);
|
||||
}
|
||||
if ((!$result && ($network == "")) || ($network == NETWORK_PUMPIO)) {
|
||||
$result = self::pumpio($webfinger);
|
||||
$result = self::pumpio($webfinger, $addr);
|
||||
}
|
||||
if ((!$result && ($network == "")) || ($network == NETWORK_FEED)) {
|
||||
$result = self::feed($uri);
|
||||
|
@ -676,7 +676,6 @@ class Probe
|
|||
$result["baseurl"] = substr($result["url"], 0, $pos).$host;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
@ -1377,7 +1376,7 @@ class Probe
|
|||
*
|
||||
* @return array pump.io data
|
||||
*/
|
||||
private static function pumpio($webfinger)
|
||||
private static function pumpio($webfinger, $addr)
|
||||
{
|
||||
$data = [];
|
||||
foreach ($webfinger["links"] as $link) {
|
||||
|
@ -1415,6 +1414,13 @@ class Probe
|
|||
|
||||
$data = array_merge($data, $profile_data);
|
||||
|
||||
if (($addr != '') && ($data['name'] != '')) {
|
||||
$name = trim(str_replace($addr, '', $data['name']));
|
||||
if ($name != '') {
|
||||
$data['name'] = $name;
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue