From f3a2b354db014fb034c8bceaf21b77fcc2d34c39 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 1 Mar 2021 02:20:19 -0700 Subject: [PATCH] Update bouncer --- app/Util/Sentiment/Bouncer.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/Util/Sentiment/Bouncer.php b/app/Util/Sentiment/Bouncer.php index 9a1e8ddef..dd72c355a 100644 --- a/app/Util/Sentiment/Bouncer.php +++ b/app/Util/Sentiment/Bouncer.php @@ -15,6 +15,10 @@ class Bouncer { return; } + if($status->profile->user->is_admin == true) { + return; + } + $exemptionKey = 'pf:bouncer_v0:exemption_by_pid:' . $status->profile_id; $exemptionTtl = now()->addDays(12); @@ -50,6 +54,14 @@ class Bouncer { return; } + if( $status->profile->created_at->gt(now()->subMonths(6)) && + $status->profile->status_count < 2 && + $status->profile->bio && + $status->profile->website + ) { + return (new self)->handle($status); + } + $recentKey = 'pf:bouncer_v0:recent_by_pid:' . $status->profile_id; $recentTtl = now()->addHours(28); @@ -86,10 +98,6 @@ class Bouncer { return; } - if($status->profile->user->is_admin == true) { - return; - } - return (new self)->handle($status); }