projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MastoAPI: Return id as string instead of integer.
[akkoma]
/
lib
/
pleroma
/
formatter.ex
diff --git
a/lib/pleroma/formatter.ex
b/lib/pleroma/formatter.ex
index 728d2b3e8e383da7dc4bd59f673beab8a5b5a56c..f062d9a5896b6e928e8f253c86c1978d0e2c0c57 100644
(file)
--- a/
lib/pleroma/formatter.ex
+++ b/
lib/pleroma/formatter.ex
@@
-109,7
+109,7
@@
defmodule Pleroma.Formatter do
def emojify(text, additional \\ nil) do
all_emoji = if additional do
def emojify(text, additional \\ nil) do
all_emoji = if additional do
- @emoji ++ Map.to_list(additional)
+ Map.to_list(additional) ++ @emoji
else
@emoji
end
else
@emoji
end
@@
-122,4
+122,9
@@
defmodule Pleroma.Formatter do
def get_emoji(text) do
Enum.filter(@emoji, fn ({emoji, _}) -> String.contains?(text, ":#{emoji}:") end)
end
def get_emoji(text) do
Enum.filter(@emoji, fn ({emoji, _}) -> String.contains?(text, ":#{emoji}:") end)
end
+
+ def get_custom_emoji() do
+ @emoji
+ |> Enum.into %{}
+ end
end
end