- def emojify(text) do
- Enum.reduce(@emoji, text, fn ({emoji, file}, text) ->
- String.replace(text, ":#{emoji}:", "<img height='32px' width='32px' alt='#{emoji}' title='#{emoji}' src='#{file}' />")
+ def emojify(text, additional \\ nil) do
+ all_emoji = if additional do
+ Map.to_list(additional) ++ @emoji
+ else
+ @emoji
+ end
+
+ Enum.reduce(all_emoji, text, fn ({emoji, file}, text) ->
+ String.replace(text, ":#{emoji}:", "<img height='32px' width='32px' alt='#{emoji}' title='#{emoji}' src='#{MediaProxy.url(file)}' />")