since_id and max_id for RawInboxNoticeStream

Otherwise you could only fetch a strict limit since the latest notice.
This commit is contained in:
Mikael Nordfeldth 2014-05-07 11:50:20 +02:00
parent 7977361193
commit de5049bf15
1 changed files with 6 additions and 0 deletions

View File

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