]> git.mxchange.org Git - friendica-addons.git/commitdiff
Tumblr: "isLocalLink" is now "isLocalUrl" / Bluesky: Fix for an empty uri
authorMichael <heluecht@pirati.ca>
Thu, 16 May 2024 12:24:34 +0000 (12:24 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 16 May 2024 12:24:34 +0000 (12:24 +0000)
bluesky/bluesky.php
tumblr/tumblr.php

index ed2a8496d8e527a8e6008b29dcea55879cca79e9..ba7c1d6578d05eefa2bcf725c4ace6876ae2a55f 100644 (file)
@@ -1506,6 +1506,10 @@ function bluesky_fetch_missing_post(string $uri, int $uid, int $fetch_uid, int $
        }
 
        $class = bluesky_get_uri_class($uri);
+       if (empty($class)) {
+               return $fallback;
+       }
+
        $fetch_uri = $class->uri;
 
        Logger::debug('Fetch missing post', ['level' => $level, 'uid' => $uid, 'uri' => $uri]);
index 78e415ee0cacc624747f853034a88beb5ea9a877..04f6a0a488e7802ce33e066e721c6eee63ab513b 100644 (file)
@@ -614,7 +614,7 @@ function tumblr_send_legacy(array $b)
                $params['data'] = [];
                foreach ($media as $photo) {
                        if ($photo['type'] == Post\Media::IMAGE) {
-                               if (Network::isLocalLink($photo['url']) && ($data = Photo::getResourceData($photo['url']))) {
+                               if (DI::baseUrl()->isLocalUrl($photo['url']) && ($data = Photo::getResourceData($photo['url']))) {
                                        $photo = Photo::selectFirst([], ["`resource-id` = ? AND `scale` > ?", $data['guid'], 0]);
                                        if (!empty($photo)) {
                                                $params['data'][] = Photo::getImageDataForPhoto($photo);