1
1
Fork 0

Handle profile page detection without a type

This commit is contained in:
Michael 2021-08-05 11:37:04 +00:00
parent eec6cdf01b
commit d6c25dc63c

View file

@ -1412,6 +1412,8 @@ class Probe
$data["guid"] = $link["href"];
} elseif (($link["rel"] == "http://webfinger.net/rel/profile-page") && (($link["type"] ?? "") == "text/html") && !empty($link["href"])) {
$data["url"] = $link["href"];
} elseif (($link["rel"] == "http://webfinger.net/rel/profile-page") && empty($link["type"]) && !empty($link["href"])) {
$profile_url = $link["href"];
} elseif (($link["rel"] == ActivityNamespace::FEED) && !empty($link["href"])) {
$data["poll"] = $link["href"];
} elseif (($link["rel"] == ActivityNamespace::POCO) && !empty($link["href"])) {
@ -1428,6 +1430,10 @@ class Probe
}
}
if (empty($data["url"]) && !empty($profile_url)) {
$data["url"] = $profile_url;
}
if (empty($data["url"]) || empty($hcard_url)) {
return [];
}