From fd62969dc49e7e7be9a87813296232e8506d2c56 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Mon, 1 Jul 2024 11:17:14 -0400 Subject: [PATCH] Dialyzer: pattern can never match the type --- lib/pleroma/web/activity_pub/mrf/simple_policy.ex | 3 --- lib/pleroma/web/common_api.ex | 1 - 2 files changed, 4 deletions(-) diff --git a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex index 8e3021ae6..d708c99eb 100644 --- a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex +++ b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex @@ -220,7 +220,6 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do {:ok, object} <- check_object(object) do {:ok, object} else - {:reject, nil} -> {:reject, "[SimplePolicy]"} {:reject, _} = e -> e end end @@ -235,7 +234,6 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do {:ok, object} <- check_banner_removal(actor_info, object) do {:ok, object} else - {:reject, nil} -> {:reject, "[SimplePolicy]"} {:reject, _} = e -> e end end @@ -247,7 +245,6 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do {:ok, object} <- check_reject(uri, object) do {:ok, object} else - {:reject, nil} -> {:reject, "[SimplePolicy]"} {:reject, _} = e -> e end end diff --git a/lib/pleroma/web/common_api.ex b/lib/pleroma/web/common_api.ex index 7cefe3647..09bedcd2b 100644 --- a/lib/pleroma/web/common_api.ex +++ b/lib/pleroma/web/common_api.ex @@ -620,7 +620,6 @@ defmodule Pleroma.Web.CommonAPI do set_visibility(activity, opts) else nil -> {:error, :not_found} - {:error, reason} -> {:error, reason} end end