about summary refs log tree commit diff
path: root/app/models/status.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-03-08 15:17:39 +0100
committerGitHub <noreply@github.com>2020-03-08 15:17:39 +0100
commit339ce1c4e90605b736745b1f04493a247b2627ec (patch)
treebf6f6c697648416c0578fbc0e11132403a85b27c /app/models/status.rb
parent503eab1c1f101e92f163ed4f8457cac9a6193ffc (diff)
Add specific rate limits for posting and following (#13172)
Diffstat (limited to 'app/models/status.rb')
-rw-r--r--app/models/status.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 1e630196b..1610da245 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -32,6 +32,9 @@ class Status < ApplicationRecord
   include Paginable
   include Cacheable
   include StatusThreadingConcern
+  include RateLimitable
+
+  rate_limit by: :account, family: :statuses
 
   self.discard_column = :deleted_at