Added new follow limit for unconfirmed accounts to 10

• Added:
- new follow limit for unconfirmed accounts to 10
This commit is contained in:
Developer 2021-02-18 23:18:16 -05:00
parent c18bcf2b21
commit bf1d00b5f8
1 changed files with 1 additions and 0 deletions

View File

@ -13,6 +13,7 @@ class FollowLimitValidator < ActiveModel::Validator
def limit_for_account(account)
adjusted_limit = account.is_pro ? 50000 : LIMIT
adjusted_limit = account.is_flagged_as_spam ? 0 : LIMIT
adjusted_limit = !account.user.confirmed? ? 10 : LIMIT
if account.following_count < adjusted_limit
adjusted_limit