1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-24 08:44:02 +00:00

Update antispam bouncer, change recent from 1 week to 3 months

This commit is contained in:
Daniel Supernault 2020-12-15 01:03:19 -07:00
parent be3ad6b15f
commit 7d818197bb
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -18,7 +18,7 @@ class Bouncer {
$recentKey = 'pf:bouncer:recent_by_pid:' . $status->profile_id; $recentKey = 'pf:bouncer:recent_by_pid:' . $status->profile_id;
$recentTtl = now()->addMinutes(5); $recentTtl = now()->addMinutes(5);
$recent = Cache::remember($recentKey, $recentTtl, function() use($status) { $recent = Cache::remember($recentKey, $recentTtl, function() use($status) {
return $status->profile->created_at->gt(now()->subWeek()) || $status->profile->statuses()->count() == 0; return $status->profile->created_at->gt(now()->subMonths(3)) || $status->profile->statuses()->count() == 0;
}); });
if(!$recent) { if(!$recent) {