Commit 5717256e authored by Haelwenn's avatar Haelwenn
Browse files

Merge branch 'fix-2686' into 'develop'

Activity deletion: fix FunctionClauseError, fixes #2686

Closes #2686

See merge request !3475
parents f97f305d 281806de
Pipeline #36706 passed with stages
in 34 minutes and 5 seconds
......@@ -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
defp purge_web_resp_cache(%Activity{} = activity) do
%{path: path} = URI.parse(["id"])
@cachex.del(:web_resp_cache, path)
defp purge_web_resp_cache(%Activity{data: %{"id" => id}} = activity) when is_binary(id) do
with %{path: path} <- URI.parse(id) do
@cachex.del(:web_resp_cache, path)
defp purge_web_resp_cache(nil), do: nil
defp purge_web_resp_cache(activity), do: activity
def follow_accepted?(
%Activity{data: %{"type" => "Follow", "object" => followed_ap_id}} = activity
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment