logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: e2fc03ec72580630db089507fa7bc5dc83aadc46
parent 082d665160547d16a3a436d5ead327f2899b04da
Author: Mark Felder <feld@feld.me>
Date:   Sun, 28 Jan 2024 17:13:15 -0500

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.

Diffstat:

Mlib/pleroma/web/activity_pub/utils.ex7+++----
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 @@ -776,10 +776,9 @@ defmodule Pleroma.Web.ActivityPub.Utils 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