config :pleroma, :emoji,
shortcode_globs: ["/emoji/custom/**/*.png"],
groups: [
- # Place here groups, which have more priority on defaults. Example in `docs/config/custom_emoji.md`
+ # Put groups that have higher priority than defaults here. Example in `docs/config/custom_emoji.md`
Finmoji: "/finmoji/128px/*-128.png",
Custom: ["/emoji/*.png", "/emoji/custom/*.png"]
]
]
```
-Order of the `groups` matters, so to override default tags just put your group on the top of the list. E.g:
+Order of the `groups` matters, so to override default tags just put your group on top of the list. E.g:
```
config :pleroma, :emoji,
shortcode_globs: ["/emoji/custom/**/*.png"],
]
```
-Priority of tag assign in emoji.txt and custom.txt:
+Priority of tags assigns in emoji.txt and custom.txt:
`tag in file > special group setting in config.exs > default setting in config.exs`
use GenServer
@type pattern :: Regex.t() | module() | String.t()
- @type patterns :: pattern | [pattern]
- @type group_patterns :: keyword(patterns)
+ @type patterns :: pattern() | [pattern()]
+ @type group_patterns :: keyword(patterns())
@ets __MODULE__.Ets
@ets_options [:ordered_set, :protected, :named_table, {:read_concurrency, true}]
defp load do
finmoji_enabled = Keyword.get(Application.get_env(:pleroma, :instance), :finmoji_enabled)
- shortcode_globs = Keyword.get(Application.get_env(:pleroma, :emoji, []), :shortcode_globs, [])
+ shortcode_globs = Application.get_env(:pleroma, :emoji)[:shortcode_globs] || []
emojis =
(load_finmoji(finmoji_enabled) ++