Skip to content

Commit 3775f0f

Browse files
committed
Display Boosted messages in user's timelime
Signed-off-by: Nikolai Merinov <nikolai.merinov@member.fsf.org>
1 parent 6f238d5 commit 3775f0f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

lib/Db/StreamRequest.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ public function getTimelineAccount(string $actorId, int $since = 0, int $limit =
481481
$qb = $this->getStreamSelectSql();
482482
$qb->limitPaginate($since, $limit);
483483

484-
$qb->limitToAttributedTo($actorId);
484+
// $qb->limitToAttributedTo($actorId);
485485

486486
$qb->selectDestFollowing('sd', '');
487487
$qb->innerJoinSteamDest('recipient', 'id_prim', 'sd', 's');
@@ -491,6 +491,13 @@ public function getTimelineAccount(string $actorId, int $since = 0, int $limit =
491491
$qb->linkToCacheActors('ca', 's.attributed_to_prim');
492492
$qb->leftJoinStreamAction();
493493

494+
$expr = $qb->expr();
495+
$qb->andWhere($expr->orX(
496+
$expr->eq('s.attributed_to', $qb->createNamedParameter($actorId)),
497+
$expr->andX(
498+
$expr->eq('sa.boosted', $qb->createNamedParameter(1)),
499+
$expr->eq('s.type', $qb->createNamedParameter('Announce')))));
500+
494501
return $this->getStreamsFromRequest($qb);
495502
}
496503

0 commit comments

Comments
 (0)