]> git.mxchange.org Git - friendica.git/commitdiff
Handle profile page detection without a type
authorMichael <heluecht@pirati.ca>
Thu, 5 Aug 2021 11:37:04 +0000 (11:37 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 5 Aug 2021 11:37:04 +0000 (11:37 +0000)
src/Network/Probe.php

index 1c0ecc3007f04e13e802e212d6a4db4d4d56c52e..c07cc7e605c38dd64b8b28e9a795667ce16517e9 100644 (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 [];
                }