X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Factivity_pub%2Fobject_validators%2Fcommon_fields.ex;h=37ec860dcfbae67d298e9559765e9b17fbd67161;hb=0f132b802dde7f217ecb07767e0d34e3edb517b7;hp=872f80ec3e429d7c42179d23c9df9f660fe9b1c5;hpb=3f8fc34593414f6e35925038c38775203333b3f3;p=akkoma diff --git a/lib/pleroma/web/activity_pub/object_validators/common_fields.ex b/lib/pleroma/web/activity_pub/object_validators/common_fields.ex index 872f80ec3..37ec860dc 100644 --- a/lib/pleroma/web/activity_pub/object_validators/common_fields.ex +++ b/lib/pleroma/web/activity_pub/object_validators/common_fields.ex @@ -7,7 +7,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.CommonFields do alias Pleroma.Web.ActivityPub.ObjectValidators.AttachmentValidator alias Pleroma.Web.ActivityPub.ObjectValidators.TagValidator - # Activities and Objects, except (Create)ChatMessage + # Activities and Objects defmacro message_fields do quote bind_quoted: binding() do field(:type, :string) @@ -38,7 +38,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.CommonFields do end end - # Basically objects that aren't ChatMessage and Answer + # Basically objects that aren't Answer defmacro status_object_fields do quote bind_quoted: binding() do # TODO: Remove actor on objects @@ -65,4 +65,10 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.CommonFields do field(:announcements, {:array, ObjectValidators.ObjectID}, default: []) end end + + defmacro tag_fields do + quote bind_quoted: binding() do + embeds_many(:tag, TagValidator) + end + end end