$userProfile);
}
- function getNoticeIds($offset, $limit, $since_id, $max_id)
+ function getNoticeIds($offset, $limit, $since_id=null, $max_id=null)
{
if ($this->impossibleStream()) {
return array();
}
}
- function getNotices($offset, $limit, $sinceId = null, $maxId = null)
+ function getNotices($offset, $limit, $since_id=null, $max_id=null)
{
if ($this->impossibleStream()) {
return new ArrayWrapper(array());
} else {
- return parent::getNotices($offset, $limit, $sinceId, $maxId);
+ return parent::getNotices($offset, $limit, $since_id, $max_id);
}
}
function impossibleStream()
{
- $user = User::staticGet('id', $this->streamProfile->id);
+ $user = User::getKV('id', $this->streamProfile->id);
// If it's a private stream, and no user or not a subscriber
if (common_config('notice', 'hidespam')) {
if ($this->streamProfile->hasRole(Profile_role::SILENCED) &&
- (empty($this->userProfile) || !$this->userProfile->hasRight(Right::REVIEWSPAM))) {
+ (empty($this->userProfile) || (($this->userProfile->id !== $this->streamProfile->id) && !$this->userProfile->hasRight(Right::REVIEWSPAM)))) {
return true;
}
}
Notice::addWhereSinceId($notice, $since_id);
Notice::addWhereMaxId($notice, $max_id);
+ if (!$this->allVerbs) {
+ $notice->whereAdd(sprintf('verb="%s" OR verb="%s"',
+ ActivityVerb::POST,
+ ActivityUtils::resolveUri(ActivityVerb::POST, true)));
+ }
+
$notice->orderBy('created DESC, id DESC');
if (!is_null($offset)) {