Issue 10720: Use different path scheme for user avatars

This commit is contained in:
Michael 2021-09-17 18:36:20 +00:00
parent 9b19fb9b4d
commit a91e3f5dbc
12 changed files with 84 additions and 34 deletions

View file

@ -22,6 +22,8 @@
use Friendica\App;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\User;
use Friendica\Util\Proxy;
function msearch_post(App $a)
{
@ -72,7 +74,7 @@ function msearch_post(App $a)
$results[] = [
'name' => $search_result['name'],
'url' => DI::baseUrl() . '/profile/' . $search_result['nickname'],
'photo' => DI::baseUrl() . '/photo/avatar/' . $search_result['uid'] . '.jpg',
'photo' => User::getAvatarUrlForId($search_result['uid'], Proxy::SIZE_THUMB),
'tags' => str_replace([',', ' '], [' ', ' '], $search_result['pub_keywords'])
];
}