projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
sloop around get_emoji/1 to check is_binary and have a fallthrough
[akkoma]
/
lib
/
pleroma
/
formatter.ex
diff --git
a/lib/pleroma/formatter.ex
b/lib/pleroma/formatter.ex
index cf2944c38fffa668ba6526dfd415af9ea10458ef..e5ccc7a493cee9f60a67a12b16cda6ca709b62b6 100644
(file)
--- a/
lib/pleroma/formatter.ex
+++ b/
lib/pleroma/formatter.ex
@@
-157,10
+157,12
@@
defmodule Pleroma.Formatter do
end)
end
- 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