Limit the number of people that can be followed from one account (#8807)
Configurable soft limit of 7,500, and above that, configurable ratio of 1.1 * followers, controlled by: - MAX_FOLLOWS_THRESHOLD - MAX_FOLLOWS_RATIO Fix #2311
This commit is contained in:
		@@ -25,6 +25,7 @@ class Follow < ApplicationRecord
 | 
			
		||||
  has_one :notification, as: :activity, dependent: :destroy
 | 
			
		||||
 | 
			
		||||
  validates :account_id, uniqueness: { scope: :target_account_id }
 | 
			
		||||
  validates_with FollowLimitValidator, on: :create
 | 
			
		||||
 | 
			
		||||
  scope :recent, -> { reorder(id: :desc) }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user