glitchier-soc/app
Patrick Figel ef6f02c173 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.
2017-04-29 00:18:32 +02:00
..
assets Minor updates to zh-CN JS translation (#2557) 2017-04-28 16:45:41 +02:00
controllers Return missing page when tag does not exist (#2563) 2017-04-28 15:11:21 +02:00
helpers Update settings_helper.rb (#2556) 2017-04-28 01:59:19 +02:00
lib Hotfix remote status formatting (#2543) 2017-04-27 23:37:22 +02:00
mailers Instance helper to replace site title helper (#2038) 2017-04-18 00:16:32 +02:00
models Set correct attachment type for rejected media (#2599) 2017-04-29 00:18:32 +02:00
presenters Bump version, improve how version is stored for better commit history (#2526) 2017-04-27 15:22:19 +02:00
services Improve shared status verification (#2525) 2017-04-27 17:06:47 +02:00
validators Stricter whitelist rules (#2213) 2017-04-26 01:22:51 +02:00
views Fix API for Mastodon version (#2590) 2017-04-28 17:53:37 +02:00
workers Punycode URI normalization (#2370) 2017-04-25 02:47:31 +02:00