1
0
Fork 0
forked from mirror/pixelfed

Merge pull request #2516 from pixelfed/staging

Update bouncer
This commit is contained in:
daniel 2020-12-17 17:48:50 -07:00 committed by GitHub
commit efeea3f00c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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()->subMonths(3)) || $status->profile->statuses()->count() == 0; return $status->profile->created_at->gt(now()->subMonths(2)) || $status->profile->statuses()->count() == 0;
}); });
if(!$recent) { if(!$recent) {