logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 2062e126f11019c0b981fe92cebfbe32dbbc1261
parent 3fbe8ada93f7da0d004acb0a8671ae5b009c06eb
Author: Mark Felder <feld@feld.me>
Date:   Sat, 27 Jan 2024 10:41:09 -0500

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()

Diffstat:

Mlib/pleroma/emoji.ex4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/pleroma/emoji.ex b/lib/pleroma/emoji.ex @@ -51,12 +51,12 @@ defmodule Pleroma.Emoji 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