purge chat and shout endpoints
[akkoma] / lib / pleroma / web / activity_pub / object_validators / common_fields.ex
index 872f80ec3e429d7c42179d23c9df9f660fe9b1c5..37ec860dcfbae67d298e9559765e9b17fbd67161 100644 (file)
@@ -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