Merge branch 'support-emoji-staticfe' into 'develop'
authorrinpatch <rinpatch@sdf.org>
Mon, 23 Mar 2020 10:43:20 +0000 (10:43 +0000)
committerrinpatch <rinpatch@sdf.org>
Mon, 23 Mar 2020 10:43:20 +0000 (10:43 +0000)
Add emoji support in statuses in staticfe

Closes #1453

See merge request pleroma/pleroma!2324

lib/pleroma/web/static_fe/static_fe_controller.ex
priv/static/static/static-fe.css

index 7f946426801ee1d6e69fe67eefd2e51538ec07a6..7a35238d7dd71657124d96a919485c7cd1c93c55 100644 (file)
@@ -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
index 19c56387b1ea9aa19f3d0f8d596c949f0b0c6485..db61ff2665ba2aef7f33dbfa8dbf29b7f6cdcba7 100644 (file)
@@ -174,3 +174,10 @@ button {
     font-weight: 500;
     font-size: 16px;
 }
+
+img.emoji {
+  width: 32px;
+  height: 32px;
+  padding: 0;
+  vertical-align: middle;
+}