From: Egor Kislitsyn Date: Mon, 23 Mar 2020 10:03:31 +0000 (+0400) Subject: Add emoji support in statuses in staticfe X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=5a34dca8eda46479a3459b60c623d6fa94fc662b;p=akkoma Add emoji support in statuses in staticfe --- diff --git a/lib/pleroma/web/static_fe/static_fe_controller.ex b/lib/pleroma/web/static_fe/static_fe_controller.ex index 7f9464268..7a35238d7 100644 --- a/lib/pleroma/web/static_fe/static_fe_controller.ex +++ b/lib/pleroma/web/static_fe/static_fe_controller.ex @@ -60,7 +60,9 @@ defmodule Pleroma.Web.StaticFE.StaticFEController do content = if data["content"] do - Pleroma.HTML.filter_tags(data["content"]) + data["content"] + |> Pleroma.HTML.filter_tags() + |> Pleroma.Emoji.Formatter.emojify(Map.get(data, "emoji", %{})) else nil end diff --git a/priv/static/static/static-fe.css b/priv/static/static/static-fe.css index 19c56387b..db61ff266 100644 --- a/priv/static/static/static-fe.css +++ b/priv/static/static/static-fe.css @@ -174,3 +174,10 @@ button { font-weight: 500; font-size: 16px; } + +img.emoji { + width: 32px; + height: 32px; + padding: 0; + vertical-align: middle; +}