diff options
author | Starfall <us@starfall.systems> | 2021-01-07 10:25:39 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2021-01-07 10:25:39 -0600 |
commit | 29227b32e150894e15098bcf216b1f5c08763200 (patch) | |
tree | afa3ac9c52a63ca672e619876c84cf59f2dbb36f /app/models/follow_request.rb | |
parent | 6ed4e874c5ace36344f77b3f096c4089d9b11e01 (diff) | |
parent | d42e7e01dcd464f80637682d4eee6e5a7f36f26e (diff) |
Merge remote-tracking branch 'glitchsoc/master' into main
Diffstat (limited to 'app/models/follow_request.rb')
-rw-r--r-- | app/models/follow_request.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/follow_request.rb b/app/models/follow_request.rb index 2d2a77b59..59fefcdf6 100644 --- a/app/models/follow_request.rb +++ b/app/models/follow_request.rb @@ -17,6 +17,7 @@ class FollowRequest < ApplicationRecord include Paginable include RelationshipCacheable include RateLimitable + include FollowLimitable rate_limit by: :account, family: :follows @@ -26,7 +27,6 @@ class FollowRequest < ApplicationRecord has_one :notification, as: :activity, dependent: :destroy validates :account_id, uniqueness: { scope: :target_account_id } - validates_with FollowLimitValidator, on: :create, if: :rate_limit? def authorize! account.follow!(target_account, reblogs: show_reblogs, notify: notify, uri: uri) |