From e2fc03ec72580630db089507fa7bc5dc83aadc46 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sun, 28 Jan 2024 17:13:15 -0500 Subject: [PATCH] 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. --- lib/pleroma/web/activity_pub/utils.ex | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex index e2fc2640d..3413783e2 100644 --- a/lib/pleroma/web/activity_pub/utils.ex +++ b/lib/pleroma/web/activity_pub/utils.ex @@ -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