mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-18 15:14:42 +00:00
Activity: all_non_create_by_object_ap_id_q → by_object_ap_id
This commit is contained in:
parent
b82c6dc536
commit
75e4c8f0b2
2 changed files with 2 additions and 3 deletions
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue