Only hide spam if set
This commit is contained in:
parent
d016ce846e
commit
6f2f302004
@ -47,6 +47,7 @@ if (!defined('STATUSNET')) {
|
||||
class ActivitySpamPlugin extends Plugin
|
||||
{
|
||||
public $server = null;
|
||||
public $hideSpam = false;
|
||||
|
||||
const REVIEWSPAM = 'ActivitySpamPlugin::REVIEWSPAM';
|
||||
const TRAINSPAM = 'ActivitySpamPlugin::TRAINSPAM';
|
||||
@ -62,6 +63,8 @@ class ActivitySpamPlugin extends Plugin
|
||||
common_config('activityspam', 'consumerkey'),
|
||||
common_config('activityspam', 'secret'));
|
||||
|
||||
$this->hideSpam = common_config('activityspam', 'hidespam');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -281,6 +284,7 @@ class ActivitySpamPlugin extends Plugin
|
||||
|
||||
function onEndNoticeInScope($notice, $profile, &$bResult)
|
||||
{
|
||||
if ($this->hideSpam) {
|
||||
if ($bResult) {
|
||||
|
||||
$score = $this->getScore($notice);
|
||||
@ -293,6 +297,7 @@ class ActivitySpamPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user