mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 22:41:27 +00:00
Update bouncer
This commit is contained in:
parent
106964f8ea
commit
f3a2b354db
1 changed files with 12 additions and 4 deletions
|
@ -15,6 +15,10 @@ class Bouncer {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($status->profile->user->is_admin == true) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$exemptionKey = 'pf:bouncer_v0:exemption_by_pid:' . $status->profile_id;
|
$exemptionKey = 'pf:bouncer_v0:exemption_by_pid:' . $status->profile_id;
|
||||||
$exemptionTtl = now()->addDays(12);
|
$exemptionTtl = now()->addDays(12);
|
||||||
|
|
||||||
|
@ -50,6 +54,14 @@ class Bouncer {
|
||||||
return;
|
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;
|
$recentKey = 'pf:bouncer_v0:recent_by_pid:' . $status->profile_id;
|
||||||
$recentTtl = now()->addHours(28);
|
$recentTtl = now()->addHours(28);
|
||||||
|
|
||||||
|
@ -86,10 +98,6 @@ class Bouncer {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($status->profile->user->is_admin == true) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (new self)->handle($status);
|
return (new self)->handle($status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue