]> git.mxchange.org Git - friendica.git/blobdiff - src/Network/Probe.php
Merge pull request #10575 from MrPetovan/bug/10019-peertube-embed
[friendica.git] / src / Network / Probe.php
index d0aaaa7a0777f9cefda2af300b43344cd657ca55..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 [];
                }
@@ -2220,7 +2226,7 @@ class Probe
                        $data = [
                                'name' => $profile['name'], 'nick' => $profile['nick'], 'guid' => $approfile['diaspora:guid'] ?? '',
                                'url' => $profile['url'], 'addr' => $profile['addr'], 'alias' => $profile['alias'],
-                               'photo' => Contact::getAvatarUrlForId($profile['id'], $profile['updated']),
+                               'photo' => Contact::getAvatarUrlForId($profile['id'], '', $profile['updated']),
                                'header' => $profile['header'] ? Contact::getHeaderUrlForId($profile['id'], $profile['updated']) : '',
                                'account-type' => $profile['contact-type'], 'community' => ($profile['contact-type'] == User::ACCOUNT_TYPE_COMMUNITY),
                                'keywords' => $profile['keywords'], 'location' => $profile['location'], 'about' => $profile['about'],