From 75e4c8f0b21323f072f06e25e10762339abc6e3b Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Mon, 21 Jan 2019 06:15:05 +0100 Subject: [PATCH] =?utf8?q?Activity:=20all=5Fnon=5Fcreate=5Fby=5Fobject=5Fa?= =?utf8?q?p=5Fid=5Fq=20=E2=86=92=20by=5Fobject=5Fap=5Fid?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lib/pleroma/activity.ex | 3 +-- lib/pleroma/object.ex | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) 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 -- 2.45.2