projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix multi-after-transaction
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
object_validators
/
delete_validator.ex
diff --git
a/lib/pleroma/web/activity_pub/object_validators/delete_validator.ex
b/lib/pleroma/web/activity_pub/object_validators/delete_validator.ex
index 750ea0f7fefd0a55d7e5c0b25ea0f8206abe3fcd..f0c99356e75aa3f54f773ce66b3cff37bafbe860 100644
(file)
--- a/
lib/pleroma/web/activity_pub/object_validators/delete_validator.ex
+++ b/
lib/pleroma/web/activity_pub/object_validators/delete_validator.ex
@@
-15,13
+15,15
@@
defmodule Pleroma.Web.ActivityPub.ObjectValidators.DeleteValidator do
@primary_key false
embedded_schema do
@primary_key false
embedded_schema do
- field(:id, ObjectValidators.ObjectID, primary_key: true)
- field(:type, :string)
- field(:actor, ObjectValidators.ObjectID)
- field(:to, ObjectValidators.Recipients, default: [])
- field(:cc, ObjectValidators.Recipients, default: [])
+ quote do
+ unquote do
+ import Elixir.Pleroma.Web.ActivityPub.ObjectValidators.CommonFields
+ message_fields()
+ activity_fields()
+ end
+ end
+
field(:deleted_activity_id, ObjectValidators.ObjectID)
field(:deleted_activity_id, ObjectValidators.ObjectID)
- field(:object, ObjectValidators.ObjectID)
end
def cast_data(data) do
end
def cast_data(data) do
@@
-54,7
+56,7
@@
defmodule Pleroma.Web.ActivityPub.ObjectValidators.DeleteValidator do
Tombstone
Video
}
Tombstone
Video
}
- def validate_data(cng) do
+ def
p
validate_data(cng) do
cng
|> validate_required([:id, :type, :actor, :to, :cc, :object])
|> validate_inclusion(:type, ["Delete"])
cng
|> validate_required([:id, :type, :actor, :to, :cc, :object])
|> validate_inclusion(:type, ["Delete"])