diff options
author | rinpatch <rinpatch@sdf.org> | 2020-04-16 18:37:56 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-04-16 18:37:56 +0000 |
commit | 0ddee13c832df08da65ad0b1b7c11eea18afba26 (patch) | |
tree | 03d909dfcf5974838919076c6ae994515b0c1f84 /lib/pleroma/web/common_api/utils.ex | |
parent | 252528a4b9ca3a5d92f1676c44989ad7d8777de1 (diff) | |
parent | 942d7467ca28c898f914539ae85ea3044c36ebbc (diff) | |
download | pleroma-0ddee13c832df08da65ad0b1b7c11eea18afba26.tar.gz |
Merge branch 'features/remove-user-source_data' into 'develop'
User: remove source_data
Closes #820
See merge request pleroma/pleroma!2339
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r-- | lib/pleroma/web/common_api/utils.ex | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index 635e7cd38..7eec5aa09 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -10,7 +10,6 @@ defmodule Pleroma.Web.CommonAPI.Utils do alias Pleroma.Activity alias Pleroma.Config alias Pleroma.Conversation.Participation - alias Pleroma.Emoji alias Pleroma.Formatter alias Pleroma.Object alias Pleroma.Plugs.AuthenticationPlug @@ -18,7 +17,6 @@ defmodule Pleroma.Web.CommonAPI.Utils do alias Pleroma.User alias Pleroma.Web.ActivityPub.Utils alias Pleroma.Web.ActivityPub.Visibility - alias Pleroma.Web.Endpoint alias Pleroma.Web.MediaProxy require Logger @@ -175,7 +173,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do "replies" => %{"type" => "Collection", "totalItems" => 0} } - {note, Map.merge(emoji, Emoji.Formatter.get_emoji_map(option))} + {note, Map.merge(emoji, Pleroma.Emoji.Formatter.get_emoji_map(option))} end) end_time = @@ -431,19 +429,6 @@ defmodule Pleroma.Web.CommonAPI.Utils do end end - def emoji_from_profile(%User{bio: bio, name: name}) do - [bio, name] - |> Enum.map(&Emoji.Formatter.get_emoji/1) - |> Enum.concat() - |> Enum.map(fn {shortcode, %Emoji{file: path}} -> - %{ - "type" => "Emoji", - "icon" => %{"type" => "Image", "url" => "#{Endpoint.url()}#{path}"}, - "name" => ":#{shortcode}:" - } - end) - end - def maybe_notify_to_recipients( recipients, %Activity{data: %{"to" => to, "type" => _type}} = _activity |