Rename upload filter to AnalyzeMetadata

This commit is contained in:
Mark Felder 2021-05-18 15:33:33 -05:00
parent bcf6efce15
commit 9b6b5ac196
3 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- MRF (`FollowBotPolicy`): New MRF Policy which makes a designated local Bot account attempt to follow all users in public Notes received by your instance. Users who require approving follower requests or have #nobot in their profile are excluded.
- Return OAuth token `id` (primary key) in POST `/oauth/token`.
- `SetMeta` upload filter for extracting attachment dimensions.
- `AnalyzeMetadata` upload filter for extracting attachment dimensions.
- Attachment dimensions are federated when available.
### Fixed

View File

@ -2,7 +2,7 @@
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Upload.Filter.SetMeta do
defmodule Pleroma.Upload.Filter.AnalyzeMetadata do
@moduledoc """
Extracts metadata about the upload, such as width/height
"""

View File

@ -2,9 +2,9 @@
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Upload.Filter.SetMetaTest do
defmodule Pleroma.Upload.Filter.AnalyzeMetadataTest do
use Pleroma.DataCase, async: true
alias Pleroma.Upload.Filter.SetMeta
alias Pleroma.Upload.Filter.AnalyzeMetadata
test "adds the image dimensions" do
upload = %Pleroma.Upload{
@ -14,6 +14,6 @@ defmodule Pleroma.Upload.Filter.SetMetaTest do
tempfile: Path.absname("test/fixtures/image.jpg")
}
assert {:ok, :filtered, %{width: 1024, height: 768}} = SetMeta.filter(upload)
assert {:ok, :filtered, %{width: 1024, height: 768}} = AnalyzeMetadata.filter(upload)
end
end