Zot: Retrieve alias addresses as well
This commit is contained in:
parent
94954c810b
commit
8acd8912eb
1 changed files with 12 additions and 2 deletions
|
@ -724,8 +724,18 @@ class Probe
|
||||||
$zot_url = self::$baseurl . '/.well-known/zot-info?address=' . $data['addr'];
|
$zot_url = self::$baseurl . '/.well-known/zot-info?address=' . $data['addr'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($zot_url)) {
|
if (empty($zot_url)) {
|
||||||
$data = self::pollZot($zot_url, $data);
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = self::pollZot($zot_url, $data);
|
||||||
|
|
||||||
|
if (!empty($data['url']) && !empty($webfinger['aliases']) && is_array($webfinger['aliases'])) {
|
||||||
|
foreach ($webfinger['aliases'] as $alias) {
|
||||||
|
if (!strstr($alias, '@') && Strings::normaliseLink($alias) != Strings::normaliseLink($data['url'])) {
|
||||||
|
$data['alias'] = $alias;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
|
Loading…
Reference in a new issue