diff --git a/lib/Db/CacheActorsRequest.php b/lib/Db/CacheActorsRequest.php index 3c6f50b0..c5ef106e 100644 --- a/lib/Db/CacheActorsRequest.php +++ b/lib/Db/CacheActorsRequest.php @@ -194,9 +194,8 @@ class CacheActorsRequest extends CacheActorsRequestBuilder { */ public function getFromLocalAccount(string $account): Person { $qb = $this->getCacheActorsSelectSql(); - $this->limitToPreferredUsername($qb, $account); - $this->limitToLocal($qb, true); - /** @var SocialQueryBuilder $qb */ + $qb->limitToPreferredUsername($account); + $qb->limitToLocal(true); $qb->leftJoinCacheDocuments('icon_id'); $this->leftJoinDetails($qb); diff --git a/lib/Model/ActivityPub/Actor/Person.php b/lib/Model/ActivityPub/Actor/Person.php index a161a773..f2c88641 100644 --- a/lib/Model/ActivityPub/Actor/Person.php +++ b/lib/Model/ActivityPub/Actor/Person.php @@ -664,7 +664,7 @@ class Person extends ACore implements IQueryRow, JsonSerializable { try { $deletedValue = $this->get('deleted', $data); - if ($deletedValue === '') { + if ($deletedValue === '' || $deletedValue === '0000-00-00 00:00:00') { return; } $dTime = new DateTime(); diff --git a/lib/Service/AccountService.php b/lib/Service/AccountService.php index eb5a10f4..30e0758f 100644 --- a/lib/Service/AccountService.php +++ b/lib/Service/AccountService.php @@ -325,7 +325,7 @@ class AccountService { /** * @param Person $actor */ - public function addLocalActorDetailCount(Person &$actor) { + public function addLocalActorDetailCount(Person $actor) { $lastPostCreation = ''; try { $lastPost = $this->streamRequest->lastNoteFromActorId($actor->getId());