From 2062e126f11019c0b981fe92cebfbe32dbbc1261 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sat, 27 Jan 2024 10:41:09 -0500 Subject: [PATCH] Pleroma.Web.ActivityPub.Builder: fix dialyzer error lib/pleroma/web/activity_pub/builder.ex:115:pattern_match The pattern can never match the type. Pattern: _emojo = %{:file => _path} Type: nil | binary() --- lib/pleroma/emoji.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/emoji.ex b/lib/pleroma/emoji.ex index 48302f396..2f0702565 100644 --- a/lib/pleroma/emoji.ex +++ b/lib/pleroma/emoji.ex @@ -51,12 +51,12 @@ def reload do end @doc "Returns the path of the emoji `name`." - @spec get(String.t()) :: String.t() | nil + @spec get(String.t()) :: Emoji.t() | nil def get(name) do name = maybe_strip_name(name) case :ets.lookup(@ets, name) do - [{_, path}] -> path + [{_, emoji}] -> emoji _ -> nil end end