1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.StaticFE.StaticFEView do
9 alias Pleroma.Web.MediaProxy
10 alias Pleroma.Formatter
14 def emoji_for_user(%User{} = user) do
15 (user.info.source_data["tag"] || [])
16 |> Enum.filter(fn %{"type" => t} -> t == "Emoji" end)
17 |> Enum.map(fn %{"icon" => %{"url" => url}, "name" => name} ->
18 {String.trim(name, ":"), url}