commit: 8b651fab1d711a18e8046271a83bcdd756a26670
parent df7a8d4efe669c14775dd2bedf4b20dade6d7b66
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 15 Mar 2024 16:20:16 +0100
AttachmentValidator: Set "Link" as default type
Diffstat:
1 file changed, 2 insertions(+), 2 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
@@ -12,13 +12,13 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.AttachmentValidator do
@primary_key false
embedded_schema do
field(:id, :string)
- field(:type, :string)
+ field(:type, :string, default: "Link")
field(:mediaType, ObjectValidators.MIME, default: "application/octet-stream")
field(:name, :string)
field(:blurhash, :string)
embeds_many :url, UrlObjectValidator, primary_key: false do
- field(:type, :string)
+ field(:type, :string, default: "Link")
field(:href, ObjectValidators.Uri)
field(:mediaType, ObjectValidators.MIME, default: "application/octet-stream")
field(:width, :integer)