mirror of
https://github.com/friendica/friendica
synced 2025-04-27 07:50:10 +00:00
API: Improved avatar handling
This commit is contained in:
parent
a02426c08c
commit
96809b3fdd
5 changed files with 67 additions and 35 deletions
|
@ -29,7 +29,6 @@ use Friendica\Database\DBA;
|
|||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Proxy;
|
||||
|
||||
/**
|
||||
* Class Account
|
||||
|
@ -114,9 +113,9 @@ class Account extends BaseDataTransferObject
|
|||
|
||||
$this->note = BBCode::convert($publicContact['about'], false);
|
||||
$this->url = $publicContact['url'];
|
||||
$this->avatar = ($userContact['photo'] ?? $publicContact['photo']) ?: Proxy::proxifyUrl($userContact['avatar'] ?? $publicContact['avatar']);
|
||||
$this->avatar = (($userContact['photo'] ?? '') ?: $publicContact['photo']) ?: DI::baseUrl() . '/photo/contact/'. (($userContact['id'] ?? 0) ?: $publicContact['id']);
|
||||
$this->avatar_static = $this->avatar;
|
||||
$this->header = Proxy::proxifyUrl($userContact['header'] ?? $publicContact['header'] ?? '') ?: DI::baseUrl() . '/images/blank.png';
|
||||
$this->header = DI::baseUrl() . '/photo/header/'. (($userContact['id'] ?? 0) ?: $publicContact['id']);
|
||||
$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