class PublicNoticeStream extends ScopingNoticeStream
{
- function __construct()
+ function __construct($profile=null)
{
parent::__construct(new CachingNoticeStream(new RawPublicNoticeStream(),
- 'public'));
+ 'public'),
+ $profile);
}
}
$notice->limit($offset, $limit);
}
- if (common_config('public', 'localonly')) {
- $notice->whereAdd('is_local = ' . Notice::LOCAL_PUBLIC);
- } else {
- // -1 == blacklisted, -2 == gateway (i.e. Twitter)
- $notice->whereAdd('is_local !='. Notice::LOCAL_NONPUBLIC);
- $notice->whereAdd('is_local !='. Notice::GATEWAY);
- }
+ // This feed always gives only local activities.
+ $notice->whereAdd('is_local = ' . Notice::LOCAL_PUBLIC);
Notice::addWhereSinceId($notice, $since_id);
Notice::addWhereMaxId($notice, $max_id);
+ if (!empty($this->selectVerbs)) {
+ $notice->whereAddIn('verb', $this->selectVerbs, $notice->columnType('verb'));
+ }
+
$ids = array();
if ($notice->find()) {
return $ids;
}
-}
\ No newline at end of file
+}