commit: eba16665752d3e6be6b5a2df8cebeb4e22c9cad0
parent 09e0304b9cfe9fb4365c0c6fafaffdb26defce10
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 22 Jul 2022 20:22:44 +0200
AttachmentValidator: fix_media_type/1 fallback to application/octet-stream
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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