pixelfed/app/Util/RateLimit/User.php

56 lines
768 B
PHP
Raw Normal View History

2019-06-19 08:45:51 +00:00
<?php
namespace App\Util\RateLimit;
trait User {
2019-06-19 19:19:19 +00:00
public function isTrustedAccount()
{
return $this->created_at->lt(now()->subDays(20));
}
2019-06-19 08:45:51 +00:00
public function getMaxPostsPerHourAttribute()
{
return 20;
}
public function getMaxPostsPerDayAttribute()
{
return 100;
}
public function getMaxCommentsPerHourAttribute()
{
return 50;
}
public function getMaxCommentsPerDayAttribute()
{
return 500;
}
2019-06-19 19:19:19 +00:00
public function getMaxLikesPerHourAttribute()
{
return 120;
}
public function getMaxLikesPerDayAttribute()
{
return 1000;
}
public function getMaxSharesPerHourAttribute()
{
return 60;
}
public function getMaxSharesPerDayAttribute()
{
return 500;
}
2019-06-24 02:35:37 +00:00
public function getMaxInstanceBansPerDayAttribute()
{
return 100;
}
2019-06-19 08:45:51 +00:00
}