X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Factivity_pub%2Fobject_validators%2Fcommon_validations.ex;h=b479c391837f1ccf20dfabd5134b562054e4dbb8;hb=0f9bed022fab80f59353597dde82896ef954a678;hp=db0e2072dbd53198b875ab034a4afce9835e03a1;hpb=1bd1f62af55e01613e6362661b36a19091c87424;p=akkoma
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 db0e2072d..b479c3918 100644
--- 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
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# 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
- |> 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
- [{field_name, "can't find user"}]
+ [{field_name, "can't find object"}]
end
end)
end