forked from GNUsocial/gnu-social
Take out unnecessary HideNoticeStream
This commit is contained in:
parent
04ad0838be
commit
391676863a
@ -49,30 +49,13 @@ class PopularNoticeStream extends ScopingNoticeStream
|
|||||||
{
|
{
|
||||||
function __construct($profile=null)
|
function __construct($profile=null)
|
||||||
{
|
{
|
||||||
parent::__construct(new HideSilencedStream(new CachingNoticeStream(new RawPopularNoticeStream(),
|
parent::__construct(new CachingNoticeStream(new RawPopularNoticeStream(),
|
||||||
'popular',
|
'popular',
|
||||||
false)),
|
false),
|
||||||
$profile);
|
$profile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class HideSilencedStream extends FilteringNoticeStream
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Only return notices where the profile is in scope
|
|
||||||
*
|
|
||||||
* @param Notice $notice The notice to check
|
|
||||||
*
|
|
||||||
* @return boolean whether to include the notice
|
|
||||||
*/
|
|
||||||
|
|
||||||
function filter($notice)
|
|
||||||
{
|
|
||||||
$author = $notice->getProfile();
|
|
||||||
return !$author->isSilenced();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class RawPopularNoticeStream extends NoticeStream
|
class RawPopularNoticeStream extends NoticeStream
|
||||||
{
|
{
|
||||||
function getNoticeIds($offset, $limit, $since_id, $max_id)
|
function getNoticeIds($offset, $limit, $since_id, $max_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user