mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
Fix issues when attempting to appeal an old strike (#17554)
* Display an error when an appeal could not be submitted * Do not offer users to appeal old strikes * Fix 500 error when trying to appeal a strike that is too old * Avoid using an extra translatable string
This commit is contained in:
@@ -6,7 +6,7 @@ class AccountWarningPolicy < ApplicationPolicy
|
||||
end
|
||||
|
||||
def appeal?
|
||||
target?
|
||||
target? && record.created_at >= Appeal::MAX_STRIKE_AGE.ago
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user