pixelfed/app/Util/RateLimit/User.php

116 lines
1.6 KiB
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()
{
2020-01-06 04:53:59 +00:00
return $this->created_at->lt(now()->subDays(60));
2019-06-19 19:19:19 +00:00
}
2019-06-19 08:45:51 +00:00
public function getMaxPostsPerHourAttribute()
{
2019-07-31 01:52:02 +00:00
return 50;
2019-06-19 08:45:51 +00:00
}
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
2019-07-09 03:48:04 +00:00
public function getMaxUserBansPerDayAttribute()
{
return 100;
}
2019-06-24 02:35:37 +00:00
public function getMaxInstanceBansPerDayAttribute()
{
return 100;
}
2019-07-09 03:48:04 +00:00
public function getMaxHashtagFollowsPerHourAttribute()
{
return 20;
}
public function getMaxHashtagFollowsPerDayAttribute()
{
return 100;
}
2019-07-16 05:47:14 +00:00
public function getMaxCollectionsPerHourAttribute()
{
return 10;
}
public function getMaxCollectionsPerDayAttribute()
{
return 20;
}
public function getMaxCollectionsPerMonthAttribute()
{
return 100;
}
2019-09-02 00:27:47 +00:00
public function getMaxComposeMediaUpdatesPerHourAttribute()
{
return 100;
}
public function getMaxComposeMediaUpdatesPerDayAttribute()
{
return 1000;
}
public function getMaxComposeMediaUpdatesPerMonthAttribute()
{
return 5000;
}
2020-01-06 04:53:59 +00:00
public function getMaxStoriesPerHourAttribute()
{
2020-01-06 05:05:58 +00:00
return 20;
2020-01-06 04:53:59 +00:00
}
public function getMaxStoriesPerDayAttribute()
{
2020-01-06 05:05:58 +00:00
return 30;
2020-01-06 04:53:59 +00:00
}
public function getMaxStoryDeletePerDayAttribute()
{
2020-01-06 05:05:58 +00:00
return 35;
2020-01-06 04:53:59 +00:00
}
2019-06-19 08:45:51 +00:00
}