diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-03-02 18:02:48 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-03-02 18:02:48 +0100 |
commit | 425a6c90c44a620e5015cd659cf5d8e3bf68ee07 (patch) | |
tree | 1bb889bca498b07dd4f3a56a5690ea9c2f602382 /app/models/account_warning.rb | |
parent | 0b8fe020b599341d78cc03431eb156485c70ebea (diff) | |
parent | 462a6f7d721fa0717c5627fd0f0d73ee9ec5a675 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'app/models/account_warning.rb')
-rw-r--r-- | app/models/account_warning.rb | 15 |
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 || []) |