diff --git a/lib/Db/StreamRequest.php b/lib/Db/StreamRequest.php index 564f7bc5..f9d86249 100644 --- a/lib/Db/StreamRequest.php +++ b/lib/Db/StreamRequest.php @@ -489,7 +489,7 @@ class StreamRequest extends StreamRequestBuilder { $qb->selectDestFollowing('sd', ''); $qb->innerJoinSteamDest('recipient', 'id_prim', 'sd', 's'); - $accountIsViewer = ($this->viewer) ? $this->viewer->getId() === $actorId : false; + $accountIsViewer = ($qb->hasViewer()) ? ($qb->getViewer()->getId() === $actorId) : false; $qb->limitToDest($accountIsViewer ? '' : ACore::CONTEXT_PUBLIC, 'recipient', '', 'sd'); $qb->linkToCacheActors('ca', 's.attributed_to_prim');