Pleroma.Web.ActivityPub.Utils: dialyzer error

lib/pleroma/web/activity_pub/utils.ex:779:guard_fail
The guard clause:

when _ :: %Pleroma.Object{_ => _} === nil

can never succeed.
This commit is contained in:
Mark Felder 2024-01-28 17:13:15 -05:00
parent 082d665160
commit e2fc03ec72
1 changed files with 3 additions and 4 deletions

View File

@ -776,10 +776,9 @@ defp build_flag_object(act) when is_map(act) or is_binary(act) do
build_flag_object(object)
nil ->
if %Object{} = object = Object.get_by_ap_id(id) do
build_flag_object(object)
else
%{"id" => id, "deleted" => true}
case Object.get_by_ap_id(id) do
%Object{} = object -> build_flag_object(object)
_ -> %{"id" => id, "deleted" => true}
end
end
end