Fix delete-by_ap_id to expect not only embeded objects

This commit is contained in:
rinpatch 2019-04-17 16:35:01 +03:00
parent 8e4d950f31
commit 4c289e924e

View file

@ -230,6 +230,7 @@ defmodule Pleroma.Activity do
|> Repo.delete_all()
|> elem(1)
|> Enum.find(fn
%{data: %{"type" => "Create", "object" => ap_id}} when is_binary(ap_id) -> ap_id == id
%{data: %{"type" => "Create", "object" => %{"id" => ap_id}}} -> ap_id == id
_ -> nil
end)