forked from AkkomaGang/akkoma
CreateGenericValidator: add expires_at
This commit is contained in:
parent
39870d99b8
commit
fe6924d00d
2 changed files with 3 additions and 0 deletions
|
@ -23,6 +23,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.CreateGenericValidator do
|
||||||
field(:to, Types.Recipients, default: [])
|
field(:to, Types.Recipients, default: [])
|
||||||
field(:cc, Types.Recipients, default: [])
|
field(:cc, Types.Recipients, default: [])
|
||||||
field(:object, Types.ObjectID)
|
field(:object, Types.ObjectID)
|
||||||
|
field(:expires_at, Types.DateTime)
|
||||||
end
|
end
|
||||||
|
|
||||||
def cast_data(data) do
|
def cast_data(data) do
|
||||||
|
|
|
@ -139,6 +139,8 @@ def handle(%{data: %{"type" => "Like"}} = object, meta) do
|
||||||
# - Rollback if we couldn't create it
|
# - Rollback if we couldn't create it
|
||||||
# - Increase the user note count
|
# - Increase the user note count
|
||||||
# - Increase the reply count
|
# - Increase the reply count
|
||||||
|
# - Increase replies count
|
||||||
|
# - Set up ActivityExpiration
|
||||||
# - Set up notifications
|
# - Set up notifications
|
||||||
def handle(%{data: %{"type" => "Create"}} = activity, meta) do
|
def handle(%{data: %{"type" => "Create"}} = activity, meta) do
|
||||||
with {:ok, object, meta} <- handle_object_creation(meta[:object_data], meta),
|
with {:ok, object, meta} <- handle_object_creation(meta[:object_data], meta),
|
||||||
|
|
Loading…
Reference in a new issue