From b353704548f36c409a01bd2444130f1ce1bc8873 Mon Sep 17 00:00:00 2001 From: Emerson Kfuri Date: Wed, 16 Jan 2019 17:41:17 -0200 Subject: [PATCH] Update CacheActorsRequest.php Signed-off-by: Emerson Kfuri --- lib/Db/CacheActorsRequest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Db/CacheActorsRequest.php b/lib/Db/CacheActorsRequest.php index 82a2f5de..7051dfb3 100644 --- a/lib/Db/CacheActorsRequest.php +++ b/lib/Db/CacheActorsRequest.php @@ -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');