]> git.mxchange.org Git - friendica.git/commitdiff
Issue 13939: Fix avatars for Diaspora
authorMichael <heluecht@pirati.ca>
Wed, 6 Mar 2024 03:00:09 +0000 (03:00 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 6 Mar 2024 03:00:09 +0000 (03:00 +0000)
src/Protocol/Diaspora.php

index 15068fd8ad855ca0bb364083a04d9adba62da981..0b77d748b1dfcf864550919557d4cd6f7984eeb1 100644 (file)
@@ -3886,7 +3886,7 @@ class Diaspora
         */
        private static function createProfileData(int $uid): array
        {
-               $profile = DBA::selectFirst('owner-view', ['uid', 'addr', 'name', 'location', 'net-publish', 'dob', 'about', 'pub_keywords', 'updated'], ['uid' => $uid]);
+               $profile = DBA::selectFirst('owner-view', ['uid', 'addr', 'name', 'location', 'net-publish', 'dob', 'about', 'pub_keywords', 'updated', 'photo', 'thumb', 'micro'], ['uid' => $uid]);
 
                if (!DBA::isResult($profile)) {
                        return [];
@@ -3900,9 +3900,9 @@ class Diaspora
                        'full_name'        => $profile['name'],
                        'first_name'       => $split_name['first'],
                        'last_name'        => $split_name['last'],
-                       'image_url'        => DI::baseUrl() . '/photo/custom/300/' . $profile['uid'] . '.jpg',
-                       'image_url_medium' => DI::baseUrl() . '/photo/custom/100/' . $profile['uid'] . '.jpg',
-                       'image_url_small'  => DI::baseUrl() . '/photo/custom/50/'  . $profile['uid'] . '.jpg',
+                       'image_url'        => $profile['photo'],
+                       'image_url_medium' => $profile['thumb'],
+                       'image_url_small'  => $profile['micro'],
                        'bio'              => null,
                        'birthday'         => null,
                        'gender'           => null,