]> git.mxchange.org Git - friendica-addons.git/commitdiff
Tumblr: Use the UUID to address the blog
authorMichael <heluecht@pirati.ca>
Sun, 9 Apr 2023 04:43:12 +0000 (04:43 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 9 Apr 2023 04:43:12 +0000 (04:43 +0000)
tumblr/tumblr.php

index 9da5c1c27f24b6875afebba33ef4e07cf46a57c6..7642c5d7572ffcd44be4c278a1adbef6c8db40bc 100644 (file)
@@ -25,7 +25,6 @@ use Friendica\Util\Network;
 use GuzzleHttp\Client;
 use GuzzleHttp\Exception\RequestException;
 use GuzzleHttp\HandlerStack;
-use GuzzleHttp\Psr7\Uri as Uri;
 use GuzzleHttp\Subscriber\Oauth\Oauth1;
 
 function tumblr_install()
@@ -229,9 +228,7 @@ function tumblr_settings(array &$data)
                        $userinfo = tumblr_get($connection, 'user/info');
                        if (!empty($userinfo['success'])) {
                                foreach ($userinfo['data']->response->user->blogs as $blog) {
-                                       $uri = new Uri($blog->url);
-                                       $url = trim($uri->getHost() . $uri->getPath(), '/');
-                                       $blogs[$url] = $url;
+                                       $blogs[$blog->uuid] = $blog->name;
                                }
                        }