X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Factivity_pub%2Fobject_validator.ex;h=297c19cc08be3d63134ff3a4fd1e29cefd9a891f;hb=3949cfdc249bb508c1171851fa2ec076126003cc;hp=bd0a2a8dc09e2e8e8e5d869bf6c1967d5aa2d794;hpb=59680f27ff0e1da2eb3c0506e3655f5c7b86a7ec;p=akkoma
diff --git a/lib/pleroma/web/activity_pub/object_validator.ex b/lib/pleroma/web/activity_pub/object_validator.ex
index bd0a2a8dc..297c19cc0 100644
--- a/lib/pleroma/web/activity_pub/object_validator.ex
+++ b/lib/pleroma/web/activity_pub/object_validator.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.ObjectValidator do
@@ -9,6 +9,8 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidator do
the system.
"""
+ @behaviour Pleroma.Web.ActivityPub.ObjectValidator.Validating
+
alias Pleroma.Activity
alias Pleroma.EctoType.ActivityPub.ObjectValidators
alias Pleroma.Object
@@ -32,7 +34,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidator do
alias Pleroma.Web.ActivityPub.ObjectValidators.UndoValidator
alias Pleroma.Web.ActivityPub.ObjectValidators.UpdateValidator
- @spec validate(map(), keyword()) :: {:ok, map(), keyword()} | {:error, any()}
+ @impl true
def validate(object, meta)
def validate(%{"type" => type} = object, meta)
@@ -286,7 +288,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidator do
def fetch_actor_and_object(object) do
fetch_actor(object)
- Object.normalize(object["object"], true)
+ Object.normalize(object["object"], fetch: true)
:ok
end
end