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()
This commit is contained in:
Mark Felder 2024-01-27 10:41:09 -05:00
parent 3fbe8ada93
commit 2062e126f1
1 changed files with 2 additions and 2 deletions

View File

@ -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