diff --git a/app/models/status_reference.rb b/app/models/status_reference.rb index 62be6df3b119de..dd912d995c32cb 100644 --- a/app/models/status_reference.rb +++ b/app/models/status_reference.rb @@ -17,15 +17,10 @@ class StatusReference < ApplicationRecord has_one :notification, as: :activity, dependent: :destroy - validate :validate_status_visibilities after_commit :reset_parent_cache private - def validate_status_visibilities - raise Mastodon::ValidationError, I18n.t('status_references.errors.invalid_status_visibilities') if [:public, :public_unlisted, :unlisted, :login].exclude?(target_status.visibility.to_sym) - end - def reset_parent_cache Rails.cache.delete("statuses/#{status_id}") Rails.cache.delete("statuses/#{target_status_id}")