You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mastodon/app/models
Patrick Figel 8ac7fca5d0 Set correct attachment type for rejected media (#2599)
In #2110, a new attachment type "unknown" was introduced for
attachments that were rejected due to a domain being blocked using
reject_media. However, the "type" field was never set to "unknown"
because a default value of "0" (image) is set for that column,
causing the `type.blank?` expression to always equal false.

This version uses type_changed? instead, causing the type to be set
to "unknown" unless a type has been explicitly set. This introduces
a small change in behaviour causing the type to be set to unknown
before paperclip calls `before_post_process`. Presumably this
behaviour is more appropriate than the current one because the
attachment type has not been determined by that point.

Included are new tests for `ProcessFeedService` and
`UpdateRemoteProfileService` which now check that remote media is
downloaded for non-blocked domains and is rejected for others.
8 years ago
..
concerns Remove .keep in models (#1892) 8 years ago
form Fix #795, fix #704, fix #835 - 2FA requires confirmation to be enabled (#1278) 8 years ago
web Persist UI settings, add missing localizations for German 8 years ago
account.rb More controller specs (#2561) 8 years ago
account_filter.rb Admin accounts controller cleanup (#1664) 8 years ago
application_record.rb Fix rubocop issues, introduce usage of frozen literal to improve performance 8 years ago
block.rb Rename cache key to exclude_account_ids_for:id, adjust formatting 8 years ago
domain_block.rb Punycode URI normalization (#2370) 8 years ago
export.rb Settings export refactor (#1646) 8 years ago
favourite.rb Required foreign keys (#2003) 8 years ago
feed.rb Only call regeneration worker after first login after a 14 day break 8 years ago
follow.rb fix rubocop issues 8 years ago
follow_request.rb add more tests to models 8 years ago
import.rb Add presence validation to Import (#1928) 8 years ago
media_attachment.rb Set correct attachment type for rejected media (#2599) 8 years ago
mention.rb add more tests to models 8 years ago
mute.rb Rename cache key to exclude_account_ids_for:id, adjust formatting 8 years ago
notification.rb API param to exclude notification types from response (#1341) 8 years ago
preview_card.rb OEmbed support for PreviewCard (#2337) 8 years ago
remote_follow.rb strip leading & trailing spaces from remote follow acct (#997) (#2321) 8 years ago
report.rb Report processing improvements (#2349) 8 years ago
report_filter.rb Admin reports with accounts (#2092) 8 years ago
setting.rb Add digest e-mails 8 years ago
status.rb More status specs (#2564) 8 years ago
stream_entry.rb Rewrite Atom generation from stream entries to use Ox instead of Nokogiri (#1124) 8 years ago
subscription.rb Required foreign keys (#2003) 8 years ago
tag.rb Search cleanup (#1333) 8 years ago
user.rb Admin UI for confirming users (#2245) 8 years ago
web.rb Add extended about page stub 8 years ago