New mechanism for "all" feed (InboxNoticeStream)

Also cleaned up and made typing stricter for the stream, so only
profiles can be submitted. This reasonably also means we can create
"inbox" or "all" streams for foreign profiles as well using the same
stream handler (but of course only for messages we already know about).

To avoid looking up posts for a long time in a large notice database,
the lookback period for the inbox is no longer than the profile creation
date. (this matches the behaviour of Inbox)

Inbox class can probably be removed now.
This commit is contained in:
Mikael Nordfeldth
2014-03-06 03:43:48 +01:00
parent c812e7c0d6
commit 4b2a66ed29
8 changed files with 24 additions and 21 deletions

View File

@@ -47,8 +47,7 @@ class AllmapAction extends MapAction
function prepare($args)
{
if (parent::prepare($args)) {
$cur = common_current_user();
$stream = new InboxNoticeStream($this->user, $cur->getProfile());
$stream = new InboxNoticeStream($this->user->getProfile(), $this->scoped);
$this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE,
NOTICES_PER_PAGE + 1,
null,