projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LikeValidator: Fix up context.
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
object_validators
/
common_validations.ex
diff --git
a/lib/pleroma/web/activity_pub/object_validators/common_validations.ex
b/lib/pleroma/web/activity_pub/object_validators/common_validations.ex
index db0e2072dbd53198b875ab034a4afce9835e03a1..b479c391837f1ccf20dfabd5134b562054e4dbb8 100644
(file)
--- a/
lib/pleroma/web/activity_pub/object_validators/common_validations.ex
+++ b/
lib/pleroma/web/activity_pub/object_validators/common_validations.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.ObjectValidators.CommonValidations do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.ObjectValidators.CommonValidations do
@@
-21,11
+21,11
@@
defmodule Pleroma.Web.ActivityPub.ObjectValidators.CommonValidations do
def validate_object_presence(cng, field_name \\ :object) do
cng
def validate_object_presence(cng, field_name \\ :object) do
cng
- |> validate_change(field_name, fn field_name,
actor
->
- if Object.get_cached_by_ap_id(
actor
) do
+ |> validate_change(field_name, fn field_name,
object
->
+ if Object.get_cached_by_ap_id(
object
) do
[]
else
[]
else
- [{field_name, "can't find
user
"}]
+ [{field_name, "can't find
object
"}]
end
end)
end
end
end)
end