Pleroma.Web.Metadata - tests
This commit is contained in:
parent
71cc0d5c17
commit
92055941bd
5 changed files with 185 additions and 42 deletions
|
|
@ -39,4 +39,11 @@ defmodule Pleroma.Web.Metadata.Utils do
|
|||
"(@#{user.nickname})"
|
||||
end
|
||||
end
|
||||
|
||||
@spec fetch_media_type(list(String.t()), String.t()) :: String.t() | nil
|
||||
def fetch_media_type(supported_types, media_type) do
|
||||
Enum.find(supported_types, fn support_type ->
|
||||
String.starts_with?(media_type, support_type)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue