Update CacheActorsRequest.php

Signed-off-by: Emerson Kfuri <emersonkfuri@gmail.com>
pull/344/head
Emerson Kfuri 2019-01-16 17:41:17 -02:00 zatwierdzone przez Emerson Henrique Kfuri Pereira
rodzic 2247e2482c
commit b353704548
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -220,6 +220,9 @@ class CacheActorsRequest extends CacheActorsRequestBuilder {
*/
public function getFromLocalAccount(string $account): Person {
$qb = $this->getCacheActorsSelectSql();
if (strrpos($account, '@')) {
$account = substr($account, 0, strrpos($account, '@'));
}
$this->limitToPreferredUsername($qb, $account);
$this->limitToLocal($qb, true);
$this->leftJoinCacheDocuments($qb, 'icon_id');