$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);
$result["baseurl"] = substr($result["url"], 0, $pos).$host;
}
}
-
return $result;
}
*
* @return array pump.io data
*/
- private static function pumpio($webfinger)
+ private static function pumpio($webfinger, $addr)
{
$data = [];
foreach ($webfinger["links"] as $link) {
$data = array_merge($data, $profile_data);
+ if (($addr != '') && ($data['name'] != '')) {
+ $name = trim(str_replace($addr, '', $data['name']));
+ if ($name != '') {
+ $data['name'] = $name;
+ }
+ }
+
return $data;
}