]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Workaround for #2485: in profile output on feeds, fall back to the Twitter 73x73...
authorBrion Vibber <brion@pobox.com>
Tue, 21 Sep 2010 19:38:04 +0000 (12:38 -0700)
committerBrion Vibber <brion@pobox.com>
Tue, 21 Sep 2010 19:38:04 +0000 (12:38 -0700)
lib/activityobject.php

index 677a48197fd9e0e6ff10ee0a14b4e532109c8f7c..444577775f52b9c2f5a57a9d110aae4a0aa28fe3 100644 (file)
@@ -430,6 +430,17 @@ class ActivityObject
                 $alink->height = $size;
                 $alink->width  = $size;
                 $alink->url    = Avatar::defaultImage($size);
+
+                if ($size == AVATAR_PROFILE_SIZE) {
+                    // Hack for Twitter import: we don't have a 96x96 image,
+                    // but we do have a 73x73 image. For now, fake it with that.
+                    $avatar = $profile->getAvatar(73);
+                    if ($avatar) {
+                        $alink = AvatarLink::fromAvatar($avatar);
+                        $alink->height= $size;
+                        $alink->width = $size;
+                    }
+                }
             }
 
             $object->avatarLinks[] = $alink;