mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
Rename upload filter to AnalyzeMetadata
This commit is contained in:
parent
bcf6efce15
commit
9b6b5ac196
3 changed files with 5 additions and 5 deletions
|
@ -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.
|
- 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`.
|
- 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.
|
- Attachment dimensions are federated when available.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Upload.Filter.SetMeta do
|
defmodule Pleroma.Upload.Filter.AnalyzeMetadata do
|
||||||
@moduledoc """
|
@moduledoc """
|
||||||
Extracts metadata about the upload, such as width/height
|
Extracts metadata about the upload, such as width/height
|
||||||
"""
|
"""
|
|
@ -2,9 +2,9 @@
|
||||||
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Upload.Filter.SetMetaTest do
|
defmodule Pleroma.Upload.Filter.AnalyzeMetadataTest do
|
||||||
use Pleroma.DataCase, async: true
|
use Pleroma.DataCase, async: true
|
||||||
alias Pleroma.Upload.Filter.SetMeta
|
alias Pleroma.Upload.Filter.AnalyzeMetadata
|
||||||
|
|
||||||
test "adds the image dimensions" do
|
test "adds the image dimensions" do
|
||||||
upload = %Pleroma.Upload{
|
upload = %Pleroma.Upload{
|
||||||
|
@ -14,6 +14,6 @@ defmodule Pleroma.Upload.Filter.SetMetaTest do
|
||||||
tempfile: Path.absname("test/fixtures/image.jpg")
|
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
|
||||||
end
|
end
|
Loading…
Reference in a new issue