federator: use Activity.normalize() instead of directly using Activity.get_by_ap_id().
authorWilliam Pitcock <nenolod@dereferenced.org>
Mon, 18 Jun 2018 21:20:18 +0000 (21:20 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Wed, 27 Jun 2018 13:07:55 +0000 (13:07 +0000)
lib/pleroma/web/federator/federator.ex

index 8ca530031dbc80708fa8d7c66b426b2eebbbd692..ccefb0bdfada9691bc3aa8847e131c683d01b51e 100644 (file)
@@ -95,7 +95,7 @@ defmodule Pleroma.Web.Federator do
     params = Utils.normalize_params(params)
 
     with {:ok, _user} <- ap_enabled_actor(params["actor"]),
-         nil <- Activity.get_by_ap_id(params["id"]),
+         nil <- Activity.normalize(params["id"]),
          {:ok, _activity} <- Transmogrifier.handle_incoming(params) do
     else
       %Activity{} ->