]> git.mxchange.org Git - friendica.git/blobdiff - mod/msearch.php
Check for reply existence before using its values in Model\Mail
[friendica.git] / mod / msearch.php
index b280db4f1879045d0c21641902426979d37258a9..b51757cf7f44f7b46003d5645412362442a6460c 100644 (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'])
                ];
        }