From: scarlett Date: Thu, 25 Oct 2018 16:58:46 +0000 (+0100) Subject: Make finmoji optional X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=ae5beb7b6464d9bc4532693987d9d94cd5bac6bd;p=akkoma Make finmoji optional --- diff --git a/config/config.exs b/config/config.exs index 225ca914a..2d2cdda45 100644 --- a/config/config.exs +++ b/config/config.exs @@ -96,6 +96,7 @@ config :pleroma, :instance, "text/html", "text/markdown" ], + finmoji_enabled: true, mrf_transparency: true config :pleroma, :markup, diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex index 1756cc187..ecc102b62 100644 --- a/lib/pleroma/formatter.ex +++ b/lib/pleroma/formatter.ex @@ -94,9 +94,15 @@ defmodule Pleroma.Formatter do "woollysocks" ] - @finmoji_with_filenames Enum.map(@finmoji, fn finmoji -> - {finmoji, "/finmoji/128px/#{finmoji}-128.png"} - end) + @instance Application.get_env(:pleroma, :instance) + + @finmoji_with_filenames (if Keyword.get(@instance, :finmoji_enabled) do + Enum.map(@finmoji, fn finmoji -> + {finmoji, "/finmoji/128px/#{finmoji}-128.png"} + end) + else + [] + end) @emoji_from_file (with {:ok, default} <- File.read("config/emoji.txt") do custom =