From 5a34dca8eda46479a3459b60c623d6fa94fc662b Mon Sep 17 00:00:00 2001
From: Egor Kislitsyn <egor@kislitsyn.com>
Date: Mon, 23 Mar 2020 14:03:31 +0400
Subject: [PATCH] Add emoji support in statuses in staticfe

---
 lib/pleroma/web/static_fe/static_fe_controller.ex | 4 +++-
 priv/static/static/static-fe.css                  | 7 +++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

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 @@ defp represent(%Activity{object: %Object{data: data}} = activity, selected) 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 @@ .alert-info {
     font-weight: 500;
     font-size: 16px;
 }
+
+img.emoji {
+  width: 32px;
+  height: 32px;
+  padding: 0;
+  vertical-align: middle;
+}