Skip to content
This repository has been archived by the owner on Jan 27, 2020. 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 authored and abcang committed Sep 26, 2019
1 parent 10e9014 commit 19aac33
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 19aac33

Please sign in to comment.