Skip to content

Commit

Permalink
Alterada a lógica do spam_status Ref.: #1
Browse files Browse the repository at this point in the history
  • Loading branch information
israelmelo committed Sep 5, 2024
1 parent 4ff4782 commit c6528f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function _init()
$eligible_spam = $last_spam_sent ?? $this->spam_sent_email;

$is_spam_eligible = !$eligible_spam || ($current_timestamp - $eligible_spam->getTimestamp()) >= 86400;
$is_spam_status_valid = is_null($this->spam_status) || $this->spam_status;
$is_spam_status_valid = !$this->spam_status;

if ($spam_terms && $is_spam_eligible && $is_spam_status_valid) {
$ip = $_SERVER['HTTP_X_REAL_IP'] ?? $_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['REMOTE_ADDR'] ?? '';
Expand Down Expand Up @@ -192,7 +192,7 @@ public function register() {
$this->registerMetadata($namespace,'spam_status', [
'label' => i::__('Classificar como Spam'),
'type' => 'boolean',
'default' => true,
'default' => false,
]);
}
}
Expand Down

0 comments on commit c6528f0

Please sign in to comment.