mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 16:59:41 +00:00
Change media attachments in moderated posts to not be accessible (#34872)
This commit is contained in:
@@ -228,6 +228,10 @@ class MediaAttachment < ApplicationRecord
|
||||
file.blank? && remote_url.present?
|
||||
end
|
||||
|
||||
def discarded?
|
||||
status&.discarded? || (status_id.present? && status.nil?)
|
||||
end
|
||||
|
||||
def significantly_changed?
|
||||
description_previously_changed? || thumbnail_updated_at_previously_changed? || file_meta_previously_changed?
|
||||
end
|
||||
|
||||
@@ -32,7 +32,7 @@ class StatusEdit < ApplicationRecord
|
||||
:preview_remote_url, :text_url, :meta, :blurhash,
|
||||
:not_processed?, :needs_redownload?, :local?,
|
||||
:file, :thumbnail, :thumbnail_remote_url,
|
||||
:shortcode, :video?, :audio?, to: :media_attachment
|
||||
:shortcode, :video?, :audio?, :discarded?, to: :media_attachment
|
||||
end
|
||||
|
||||
rate_limit by: :account, family: :statuses
|
||||
|
||||
Reference in New Issue
Block a user