Activity deletion: fix FunctionClauseError #2686
This commit is contained in:
parent
f97f305d00
commit
281806de75
1 changed files with 6 additions and 4 deletions
|
@ -313,13 +313,15 @@ def delete_all_by_object_ap_id(id) when is_binary(id) do
|
||||||
|
|
||||||
def delete_all_by_object_ap_id(_), do: nil
|
def delete_all_by_object_ap_id(_), do: nil
|
||||||
|
|
||||||
defp purge_web_resp_cache(%Activity{} = activity) do
|
defp purge_web_resp_cache(%Activity{data: %{"id" => id}} = activity) when is_binary(id) do
|
||||||
%{path: path} = URI.parse(activity.data["id"])
|
with %{path: path} <- URI.parse(id) do
|
||||||
@cachex.del(:web_resp_cache, path)
|
@cachex.del(:web_resp_cache, path)
|
||||||
|
end
|
||||||
|
|
||||||
activity
|
activity
|
||||||
end
|
end
|
||||||
|
|
||||||
defp purge_web_resp_cache(nil), do: nil
|
defp purge_web_resp_cache(activity), do: activity
|
||||||
|
|
||||||
def follow_accepted?(
|
def follow_accepted?(
|
||||||
%Activity{data: %{"type" => "Follow", "object" => followed_ap_id}} = activity
|
%Activity{data: %{"type" => "Follow", "object" => followed_ap_id}} = activity
|
||||||
|
|
Loading…
Reference in a new issue