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

View File

@ -112,6 +112,12 @@ class RawInboxNoticeStream extends NoticeStream
'OR notice.id IN (SELECT notice_id FROM attention WHERE profile_id=%1$d)', 'OR notice.id IN (SELECT notice_id FROM attention WHERE profile_id=%1$d)',
$this->target->id) $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->limit($offset, $limit);
$notice->orderBy('notice.created DESC'); $notice->orderBy('notice.created DESC');