Hide spam notices
This commit is contained in:
parent
76e6dd00ad
commit
d016ce846e
@ -278,4 +278,22 @@ class ActivitySpamPlugin extends Plugin
|
|||||||
$alwaysRW[] = 'spam_score';
|
$alwaysRW[] = 'spam_score';
|
||||||
return true;
|
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…
x
Reference in New Issue
Block a user