Skip to content
Snippets Groups Projects
Commit 45c75198 authored by lain's avatar lain
Browse files

Move finmojis to representation.

parent 66b4fee8
Branches
No related tags found
No related merge requests found
......@@ -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 @@ def to_map(%Activity{data: %{"object" => %{"content" => content} = object}} = ac
"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,
......
......@@ -22,7 +22,6 @@ def format_input(text, mentions) do
|> Formatter.linkify
|> String.replace("\n", "<br>\n")
|> add_user_links(mentions)
|> Formatter.finmojifiy
end
def add_user_links(text, mentions) do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment