aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2020-06-19 23:43:36 +0200
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2020-07-15 11:40:24 +0200
commitfe6924d00d710e7e568d0ed40c02d3c516d91460 (patch)
tree237973a568c5cede43958a1e12677ff07aad0ca2
parent39870d99b810940ccce430411c9fc6939f760663 (diff)
downloadpleroma-fe6924d00d710e7e568d0ed40c02d3c516d91460.tar.gz
CreateGenericValidator: add expires_at
-rw-r--r--lib/pleroma/web/activity_pub/object_validators/create_generic_validator.ex1
-rw-r--r--lib/pleroma/web/activity_pub/side_effects.ex2
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/pleroma/web/activity_pub/object_validators/create_generic_validator.ex b/lib/pleroma/web/activity_pub/object_validators/create_generic_validator.ex
index 4ad4ca0de..f467ccc7c 100644
--- a/lib/pleroma/web/activity_pub/object_validators/create_generic_validator.ex
+++ b/lib/pleroma/web/activity_pub/object_validators/create_generic_validator.ex
@@ -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
diff --git a/lib/pleroma/web/activity_pub/side_effects.ex b/lib/pleroma/web/activity_pub/side_effects.ex
index c17197bec..5104d38ee 100644
--- a/lib/pleroma/web/activity_pub/side_effects.ex
+++ b/lib/pleroma/web/activity_pub/side_effects.ex
@@ -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),