1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.StaticFE.StaticFEView do
8 alias Calendar.Strftime
9 alias Pleroma.Emoji.Formatter
11 alias Pleroma.Web.Endpoint
12 alias Pleroma.Web.Gettext
13 alias Pleroma.Web.MediaProxy
14 alias Pleroma.Web.Metadata.Utils
15 alias Pleroma.Web.Router.Helpers
19 @media_types ["image", "audio", "video"]
21 def fetch_media_type(%{"mediaType" => mediaType}) do
22 Utils.fetch_media_type(@media_types, mediaType)
25 def format_date(date) do
26 {:ok, date, _} = DateTime.from_iso8601(date)
27 Strftime.strftime!(date, "%Y/%m/%d %l:%M:%S %p UTC")
30 def instance_name, do: Pleroma.Config.get([:instance, :name], "Pleroma")
34 [:frontend_configurations, :collapse_message_with_subjects],