Skip to content
Snippets Groups Projects
Commit 4257f784 authored by Thurloat's avatar Thurloat
Browse files

sloop around get_emoji/1 to check is_binary and have a fallthrough

default that returns empty
parent a9c0f395
No related branches found
No related tags found
No related merge requests found
......@@ -157,12 +157,12 @@ defmodule Pleroma.Formatter do
end)
end
def get_emoji(nil), do: []
def get_emoji(text) do
def get_emoji(text) when is_binary(text) do
Enum.filter(@emoji, fn {emoji, _} -> String.contains?(text, ":#{emoji}:") end)
end
def get_emoji(_), do: []
def get_custom_emoji() do
@emoji
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment