summaryrefslogtreecommitdiffstats
path: root/lib/Db/NotesRequest.php
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-11-22 16:11:46 +0100
committerJulius Härtl <jus@bitgrid.net>2018-11-22 18:57:18 +0100
commit69201a9ce28c56a8accf69cef8bcadce9b563534 (patch)
treea8492f287c3a49bd14d87cf1f6d15a066dbbb4d3 /lib/Db/NotesRequest.php
parent9375d246b9b72942b22ae89fc0f09234e6a1e287 (diff)
Load streams with pagination
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/Db/NotesRequest.php')
-rw-r--r--lib/Db/NotesRequest.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Db/NotesRequest.php b/lib/Db/NotesRequest.php
index c8795d6a..715a722a 100644
--- a/lib/Db/NotesRequest.php
+++ b/lib/Db/NotesRequest.php
@@ -142,11 +142,12 @@ class NotesRequest extends NotesRequestBuilder {
*
* @return array
*/
- public function getHomeNotesForActorId(string $actorId): array {
+ public function getHomeNotesForActorId(string $actorId, $since, $limit): array {
$qb = $this->getNotesSelectSql();
$this->rightJoinFollowing($qb);
$this->limitToActorId($qb, $actorId, 'f');
+ $this->limitPaginate($qb, $since, $limit);
// $this->leftJoinCacheActors($qb, 'attributed_to');
$notes = [];
@@ -192,9 +193,10 @@ class NotesRequest extends NotesRequestBuilder {
*
* @return array
*/
- public function getDirectNotesForActorId(string $actorId): array {
+ public function getDirectNotesForActorId(string $actorId, $since, $limit): array {
$qb = $this->getNotesSelectSql();
$this->limitToRecipient($qb, $actorId);
+ $this->limitPaginate($qb, $since, $limit);
$this->leftJoinCacheActors($qb, 'attributed_to');
$notes = [];