mirror of
https://github.com/friendica/friendica
synced 2025-04-27 07:10:12 +00:00
Improved avatar handling (timestamps for caching)
This commit is contained in:
parent
97556aa69c
commit
9edc75e29d
3 changed files with 59 additions and 18 deletions
|
@ -28,6 +28,7 @@ use Friendica\Content\Text\BBCode;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Proxy;
|
||||
|
||||
/**
|
||||
* Class Account
|
||||
|
@ -112,9 +113,9 @@ class Account extends BaseDataTransferObject
|
|||
|
||||
$this->note = BBCode::convert($publicContact['about'], false);
|
||||
$this->url = $publicContact['url'];
|
||||
$this->avatar = $userContact['photo'] ?? '' ?: $publicContact['photo'] ?: Contact::getAvatarUrlForId($userContact['id'] ?? 0 ?: $publicContact['id']);
|
||||
$this->avatar = Contact::getAvatarUrlForId($userContact['id'] ?? 0 ?: $publicContact['id'], Proxy::SIZE_SMALL, $userContact['updated'] ?? '' ?: $publicContact['updated']);
|
||||
$this->avatar_static = $this->avatar;
|
||||
$this->header = Contact::getHeaderUrlForId($userContact['id'] ?? 0 ?: $publicContact['id']);
|
||||
$this->header = Contact::getHeaderUrlForId($userContact['id'] ?? 0 ?: $publicContact['id'], '', $userContact['updated'] ?? '' ?: $publicContact['updated']);
|
||||
$this->header_static = $this->header;
|
||||
$this->followers_count = $apcontact['followers_count'] ?? 0;
|
||||
$this->following_count = $apcontact['following_count'] ?? 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue