From: Haelwenn (lanodan) Monnier Date: Mon, 21 Jan 2019 05:15:05 +0000 (+0100) Subject: Activity: all_non_create_by_object_ap_id_q → by_object_ap_id X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=75e4c8f0b21323f072f06e25e10762339abc6e3b;p=akkoma Activity: all_non_create_by_object_ap_id_q → by_object_ap_id --- diff --git a/lib/pleroma/activity.ex b/lib/pleroma/activity.ex index e3edec475..3be6fb82b 100644 --- a/lib/pleroma/activity.ex +++ b/lib/pleroma/activity.ex @@ -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: diff --git a/lib/pleroma/object.ex b/lib/pleroma/object.ex index ff5eb9b27..707a61f14 100644 --- a/lib/pleroma/object.ex +++ b/lib/pleroma/object.ex @@ -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