Merge branch 'features/mediatype-mime-valid' into 'develop'
transmogrifier: MIME.valid?/1 for mediaType See merge request pleroma/pleroma!2634
This commit is contained in:
commit
674efb0ad2
@ -221,9 +221,9 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
|||||||
|
|
||||||
media_type =
|
media_type =
|
||||||
cond do
|
cond do
|
||||||
is_map(url) && is_binary(url["mediaType"]) -> url["mediaType"]
|
is_map(url) && MIME.valid?(url["mediaType"]) -> url["mediaType"]
|
||||||
is_binary(data["mediaType"]) -> data["mediaType"]
|
MIME.valid?(data["mediaType"]) -> data["mediaType"]
|
||||||
is_binary(data["mimeType"]) -> data["mimeType"]
|
MIME.valid?(data["mimeType"]) -> data["mimeType"]
|
||||||
true -> nil
|
true -> nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user