From cdb3dd48ab7177a21e1cdcef4bcff00bf5dc124f Mon Sep 17 00:00:00 2001 From: ensra Date: Tue, 21 Aug 2018 14:12:55 +0100 Subject: [PATCH] Format --- lib/pleroma/web/twitter_api/twitter_api_controller.ex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/twitter_api/twitter_api_controller.ex b/lib/pleroma/web/twitter_api/twitter_api_controller.ex index dfa6d2464..b3a56b27e 100644 --- a/lib/pleroma/web/twitter_api/twitter_api_controller.ex +++ b/lib/pleroma/web/twitter_api/twitter_api_controller.ex @@ -415,15 +415,16 @@ def update_profile(%{assigns: %{user: user}} = conn, params) do if bio = params["description"] do mentions = Formatter.parse_mentions(bio) tags = Formatter.parse_tags(bio) + emoji = (user.info["source_data"]["tag"] || []) |> Enum.filter(fn %{"type" => t} -> t == "Emoji" end) |> Enum.map(fn %{"icon" => %{"url" => url}, "name" => name} -> {String.trim(name, ":"), url} end) + bio_html = CommonUtils.format_input(bio, mentions, tags) - |> Formatter.emojify(emoji) - Map.put(params, "bio", bio_html) + Map.put(params, "bio", bio_html |> Formatter.emojify(emoji)) else params end