Read description before stripping metadata

This commit is contained in:
timorl 2024-04-19 20:51:54 +02:00
parent 9da0fe930e
commit 09d3ccf770
No known key found for this signature in database
GPG key ID: 8E97CB9C0E7F3285

View file

@ -324,12 +324,7 @@ defmodule Mix.Tasks.Pleroma.Instance do
end
defp upload_filters(filters) when is_map(filters) do
enabled_filters =
if filters.strip_metadata do
[Pleroma.Upload.Filter.Exiftool.StripMetadata]
else
[]
end
enabled_filters = []
enabled_filters =
if filters.read_description do
@ -338,6 +333,13 @@ defmodule Mix.Tasks.Pleroma.Instance do
enabled_filters
end
enabled_filters =
if filters.strip_metadata do
enabled_filters ++ [Pleroma.Upload.Filter.Exiftool.StripMetadata]
else
enabled_filters
end
enabled_filters =
if filters.anonymize do
enabled_filters ++ [Pleroma.Upload.Filter.AnonymizeFilename]