CreateGenericValidator: add expires_at
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Fri, 19 Jun 2020 21:43:36 +0000 (23:43 +0200)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Wed, 15 Jul 2020 09:40:24 +0000 (11:40 +0200)
lib/pleroma/web/activity_pub/object_validators/create_generic_validator.ex
lib/pleroma/web/activity_pub/side_effects.ex

index 4ad4ca0de5da4f07ee44521eda2ec45e497b963a..f467ccc7cfcece6710be8b390e43cef80052e3db 100644 (file)
@@ -23,6 +23,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.CreateGenericValidator do
     field(:to, Types.Recipients, default: [])
     field(:cc, Types.Recipients, default: [])
     field(:object, Types.ObjectID)
+    field(:expires_at, Types.DateTime)
   end
 
   def cast_data(data) do
index c17197becb9c4e73a2b0f3371d7a1597ba2c9875..5104d38eeafbcbda067abfdf5339eee93c75112b 100644 (file)
@@ -139,6 +139,8 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
   # - Rollback if we couldn't create it
   # - Increase the user note count
   # - Increase the reply count
+  # - Increase replies count
+  # - Set up ActivityExpiration
   # - Set up notifications
   def handle(%{data: %{"type" => "Create"}} = activity, meta) do
     with {:ok, object, meta} <- handle_object_creation(meta[:object_data], meta),