summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2020-10-11 23:34:31 -0100
committerMaxence Lange <maxence@artificial-owl.com>2020-10-11 23:34:31 -0100
commit931c1d8ba8f5c0797eba37f2fef6643389aa6059 (patch)
tree8e2d623201b24c754280bf8ffc33e33e2b3c46bd
parent1f7b24d0f2b771c66011f190f830629c143f3d97 (diff)
using hasViewer()
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r--lib/Db/StreamRequest.php2
1 files changed, 1 insertions, 1 deletions
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');