using hasViewer()

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
imp/composer-improvements
Maxence Lange 2020-10-11 23:34:31 -01:00
rodzic 1f7b24d0f2
commit 931c1d8ba8
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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');