Skip to content
Snippets Groups Projects
  • Patrick Figel's avatar
    197af5de
    Set unknown attachment type when adding domain blocks (#2605) · 197af5de
    Patrick Figel authored
    Follow-up to #2599. When a domain block with `reject_media` is
    added or `rake mastodon:media:remove_remote` is invoked, mastodon
    deletes the locally cached attachments and avatars but does not
    reflect that change in the database, causing the `file` fields to
    still have values. This change persists the deletion in the
    database and sets the attachment type to unknown.
    
    This also introduces a one-off rake task that sets all attachments
    without a local file to the "unknown" type. The upgrade notes for
    the next release should contain a post-upgrade step with
    `rake mastodon:media:set_unknown`.
    197af5de
    History
    Set unknown attachment type when adding domain blocks (#2605)
    Patrick Figel authored
    Follow-up to #2599. When a domain block with `reject_media` is
    added or `rake mastodon:media:remove_remote` is invoked, mastodon
    deletes the locally cached attachments and avatars but does not
    reflect that change in the database, causing the `file` fields to
    still have values. This change persists the deletion in the
    database and sets the attachment type to unknown.
    
    This also introduces a one-off rake task that sets all attachments
    without a local file to the "unknown" type. The upgrade notes for
    the next release should contain a post-upgrade step with
    `rake mastodon:media:set_unknown`.
block_domain_service.rb 1.37 KiB