diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2022-07-22 20:22:44 +0200 |
---|---|---|
committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2022-07-22 20:30:45 +0200 |
commit | eba16665752d3e6be6b5a2df8cebeb4e22c9cad0 (patch) | |
tree | 943d72191d175bd3b0c3ef51d4a5b6fee33e4d27 | |
parent | 09e0304b9cfe9fb4365c0c6fafaffdb26defce10 (diff) | |
download | pleroma-eba16665752d3e6be6b5a2df8cebeb4e22c9cad0.tar.gz |
AttachmentValidator: fix_media_type/1 fallback to application/octet-stream
-rw-r--r-- | lib/pleroma/web/activity_pub/object_validators/attachment_validator.ex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/object_validators/attachment_validator.ex b/lib/pleroma/web/activity_pub/object_validators/attachment_validator.ex index 8b641d88d..cf6e407e0 100644 --- a/lib/pleroma/web/activity_pub/object_validators/attachment_validator.ex +++ b/lib/pleroma/web/activity_pub/object_validators/attachment_validator.ex @@ -59,7 +59,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.AttachmentValidator do end def fix_media_type(data) do - Map.put_new(data, "mediaType", data["mimeType"]) + Map.put_new(data, "mediaType", data["mimeType"] || "application/octet-stream") end defp handle_href(href, mediaType, data) do |