1
0
Fork 0
forked from mirror/pixelfed
pixelfed/app/Util/RateLimit/User.php

86 lines
1.2 KiB
PHP
Raw Normal View History

2019-06-19 02:45:51 -06:00
<?php
namespace App\Util\RateLimit;
trait User {
2019-06-19 13:19:19 -06:00
public function isTrustedAccount()
{
return $this->created_at->lt(now()->subDays(20));
}
2019-06-19 02:45:51 -06:00
public function getMaxPostsPerHourAttribute()
{
2019-07-30 19:52:02 -06:00
return 50;
2019-06-19 02:45:51 -06:00
}
public function getMaxPostsPerDayAttribute()
{
return 100;
}
public function getMaxCommentsPerHourAttribute()
{
return 50;
}
public function getMaxCommentsPerDayAttribute()
{
return 500;
}
2019-06-19 13:19:19 -06:00
public function getMaxLikesPerHourAttribute()
{
return 120;
}
public function getMaxLikesPerDayAttribute()
{
return 1000;
}
public function getMaxSharesPerHourAttribute()
{
return 60;
}
public function getMaxSharesPerDayAttribute()
{
return 500;
}
2019-06-23 20:35:37 -06:00
2019-07-08 21:48:04 -06:00
public function getMaxUserBansPerDayAttribute()
{
return 100;
}
2019-06-23 20:35:37 -06:00
public function getMaxInstanceBansPerDayAttribute()
{
return 100;
}
2019-07-08 21:48:04 -06:00
public function getMaxHashtagFollowsPerHourAttribute()
{
return 20;
}
public function getMaxHashtagFollowsPerDayAttribute()
{
return 100;
}
2019-07-15 23:47:14 -06:00
public function getMaxCollectionsPerHourAttribute()
{
return 10;
}
public function getMaxCollectionsPerDayAttribute()
{
return 20;
}
public function getMaxCollectionsPerMonthAttribute()
{
return 100;
}
2019-06-19 02:45:51 -06:00
}