Activity: all_non_create_by_object_ap_id_q → by_object_ap_id
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Mon, 21 Jan 2019 05:15:05 +0000 (06:15 +0100)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Mon, 21 Jan 2019 06:50:57 +0000 (07:50 +0100)
lib/pleroma/activity.ex
lib/pleroma/object.ex

index e3edec4750eeeb60bfce8782ea7df36c191587b5..3be6fb82b05d40d7497488dcaba492425e24b8fc 100644 (file)
@@ -53,8 +53,7 @@ defmodule Pleroma.Activity do
     )
   end
 
-  # Wrong name, returns all.
-  def all_non_create_by_object_ap_id_q(ap_id) do
+  def by_object_ap_id(ap_id) do
     from(
       activity in Activity,
       where:
index ff5eb9b27b43a243d22483c27bf38923363e5d1b..707a61f14c44d02d3b4cf769c5b4ab41d14aebb2 100644 (file)
@@ -85,7 +85,7 @@ defmodule Pleroma.Object do
 
   def delete(%Object{data: %{"id" => id}} = object) do
     with {:ok, _obj} = swap_object_with_tombstone(object),
-         Repo.delete_all(Activity.all_non_create_by_object_ap_id_q(id)),
+         Repo.delete_all(Activity.by_object_ap_id(id)),
          {:ok, true} <- Cachex.del(:object_cache, "object:#{id}") do
       {:ok, object}
     end