about summary refs log tree commit diff
path: root/app/models/account_warning.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/account_warning.rb')
-rw-r--r--app/models/account_warning.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/app/models/account_warning.rb b/app/models/account_warning.rb
index 05d01942d..6067b54b7 100644
--- a/app/models/account_warning.rb
+++ b/app/models/account_warning.rb
@@ -17,12 +17,13 @@
 
 class AccountWarning < ApplicationRecord
   enum action: {
-    none:            0,
-    disable:         1_000,
-    delete_statuses: 1_500,
-    sensitive:       2_000,
-    silence:         3_000,
-    suspend:         4_000,
+    none:                       0,
+    disable:                    1_000,
+    mark_statuses_as_sensitive: 1_250,
+    delete_statuses:            1_500,
+    sensitive:                  2_000,
+    silence:                    3_000,
+    suspend:                    4_000,
   }, _suffix: :action
 
   belongs_to :account, inverse_of: :account_warnings
@@ -33,7 +34,7 @@ class AccountWarning < ApplicationRecord
 
   scope :latest, -> { order(id: :desc) }
   scope :custom, -> { where.not(text: '') }
-  scope :active, -> { where(overruled_at: nil).or(where('account_warnings.overruled_at >= ?', 30.days.ago)) }
+  scope :recent, -> { where('account_warnings.created_at >= ?', 3.months.ago) }
 
   def statuses
     Status.with_discarded.where(id: status_ids || [])