diff options
author | Brion Vibber <brion@pobox.com> | 2010-09-21 12:38:04 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-09-21 12:38:04 -0700 |
commit | 94de78fa0f795e7eecb8dc59a3abfeaf131f05c3 (patch) | |
tree | 5bf4b316f7f2e8d2cb951a421859ea0294436d44 /lib | |
parent | 55ad954b15d0d2d855c4cb8db5da95d3c2d0dbfb (diff) |
Workaround for #2485: in profile output on feeds, fall back to the Twitter 73x73 avatar instead of going straight to the 96x96 default image on twitter-import profiles.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/activityobject.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/activityobject.php b/lib/activityobject.php index 677a48197..444577775 100644 --- a/lib/activityobject.php +++ b/lib/activityobject.php @@ -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; |