Hide spam notices
This commit is contained in:
parent
76e6dd00ad
commit
d016ce846e
@ -278,4 +278,22 @@ class ActivitySpamPlugin extends Plugin
|
||||
$alwaysRW[] = 'spam_score';
|
||||
return true;
|
||||
}
|
||||
|
||||
function onEndNoticeInScope($notice, $profile, &$bResult)
|
||||
{
|
||||
if ($bResult) {
|
||||
|
||||
$score = $this->getScore($notice);
|
||||
|
||||
if ($score->is_spam) {
|
||||
if (empty($profile) ||
|
||||
($profile->id !== $notice->profile_id &&
|
||||
!$profile->hasRight(self::REVIEWSPAM))) {
|
||||
$bResult = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user