diff options
author | ThibG <thib@sitedethib.com> | 2021-01-06 22:03:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-06 22:03:23 +0100 |
commit | d42e7e01dcd464f80637682d4eee6e5a7f36f26e (patch) | |
tree | 3a594f4d232cad40fa268d66539498db2ea217e2 /app/models/follow.rb | |
parent | 225c934a1b66e2fcbedbda7936666c1ca3c9a04b (diff) | |
parent | 55e84f9125608f12a7d29ec9bf9240e9a48cf4e5 (diff) |
Merge pull request #1482 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/models/follow.rb')
-rw-r--r-- | app/models/follow.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/follow.rb b/app/models/follow.rb index 69a1722b3..a5e3fe809 100644 --- a/app/models/follow.rb +++ b/app/models/follow.rb @@ -17,6 +17,7 @@ class Follow < ApplicationRecord include Paginable include RelationshipCacheable include RateLimitable + include FollowLimitable rate_limit by: :account, family: :follows @@ -26,7 +27,6 @@ class Follow < ApplicationRecord has_one :notification, as: :activity, dependent: :destroy validates :account_id, uniqueness: { scope: :target_account_id } - validates_with FollowLimitValidator, on: :create, if: :rate_limit? scope :recent, -> { reorder(id: :desc) } |