From de5049bf1559abdfdaf60d87d31eb135df5afaac Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Wed, 7 May 2014 11:50:20 +0200 Subject: [PATCH] since_id and max_id for RawInboxNoticeStream Otherwise you could only fetch a strict limit since the latest notice. --- lib/inboxnoticestream.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/inboxnoticestream.php b/lib/inboxnoticestream.php index 57c5e0c80e..481634b32f 100644 --- a/lib/inboxnoticestream.php +++ b/lib/inboxnoticestream.php @@ -112,6 +112,12 @@ class RawInboxNoticeStream extends NoticeStream 'OR notice.id IN (SELECT notice_id FROM attention WHERE profile_id=%1$d)', $this->target->id) ); + if (!empty($since_id)) { + $notice->whereAdd(sprintf('notice.id > %d', $since_id)); + } + if (!empty($max_id)) { + $notice->whereAdd(sprintf('notice.id <= %d', $max_id)); + } $notice->limit($offset, $limit); $notice->orderBy('notice.created DESC'); -- 2.39.5