Move finmojis to representation.
authorRoger Braun <roger@rogerbraun.net>
Mon, 19 Jun 2017 16:06:58 +0000 (18:06 +0200)
committerRoger Braun <roger@rogerbraun.net>
Mon, 19 Jun 2017 16:06:58 +0000 (18:06 +0200)
lib/pleroma/web/twitter_api/representers/activity_representer.ex
lib/pleroma/web/twitter_api/utils.ex

index adb3f89ea351c525f8f90f5ed069aa96a8034ddd..8630f4f79c3f1e2271624cce21268730c33fe6bd 100644 (file)
@@ -4,6 +4,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
   alias Pleroma.{Activity, User}
   alias Calendar.Strftime
   alias Pleroma.Web.TwitterAPI.TwitterAPI
+  alias Pleroma.Formatter
 
   defp user_by_ap_id(user_list, ap_id) do
     Enum.find(user_list, fn (%{ap_id: user_id}) -> ap_id == user_id end)
@@ -92,7 +93,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
       "id" => activity.id,
       "user" => UserRepresenter.to_map(user, opts),
       "attentions" => [],
-      "statusnet_html" => HtmlSanitizeEx.basic_html(content),
+      "statusnet_html" => HtmlSanitizeEx.basic_html(content) |> Formatter.finmojifiy,
       "text" => HtmlSanitizeEx.strip_tags(content),
       "is_local" => true,
       "is_post_verb" => true,
index 122edfdd40938ef94b1eded8575247d46e30a068..5cbe0cf9c96acb297a119b12bf9d95f2e25595be 100644 (file)
@@ -22,7 +22,6 @@ defmodule Pleroma.Web.TwitterAPI.Utils do
     |> Formatter.linkify
     |> String.replace("\n", "<br>\n")
     |> add_user_links(mentions)
-    |> Formatter.finmojifiy
   end
 
   def add_user_links(text, mentions) do