user: use Object.normalize() instead of Object.get_by_ap_id() directly.
authorWilliam Pitcock <nenolod@dereferenced.org>
Mon, 18 Jun 2018 20:57:38 +0000 (20:57 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Wed, 27 Jun 2018 13:07:17 +0000 (13:07 +0000)
lib/pleroma/user.ex

index 94f16c3c0bb1df206b559d33dfbf7a35ffdfdc1e..df22d29a83f6ea66f45491cb419a2cf94e275b6b 100644 (file)
@@ -607,7 +607,7 @@ defmodule Pleroma.User do
     |> Enum.each(fn activity ->
       case activity.data["type"] do
         "Create" ->
-          ActivityPub.delete(Object.get_by_ap_id(activity.data["object"]["id"]))
+          ActivityPub.delete(Object.normalize(activity.data["object"]))
 
         # TODO: Do something with likes, follows, repeats.
         _ ->