Skip to content
This repository has been archived by the owner on May 16, 2019. It is now read-only.

Commit

Permalink
Fix follow limit validator reporting lower number past threshold (mas…
Browse files Browse the repository at this point in the history
…todon#9230)

* Fix follow limit validator reporting lower number past threshold

* Avoid floating point follow limit
  • Loading branch information
Gargron committed Nov 23, 2018
1 parent 330401b commit b3c29ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/validators/follow_limit_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def limit_for_account(account)
if account.following_count < LIMIT
LIMIT
else
account.followers_count * RATIO
[(account.followers_count * RATIO).round, LIMIT].max
end
end
end
Expand Down

0 comments on commit b3c29ec

Please sign in to comment.