X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fviews%2Fembed_view.ex;h=81e19673038d46e052378512ffcc71895dd5dd77;hb=52a3f0f08bd265139c8cc8ef76a03cfee924ab5e;hp=5f50bd155b7baa6d3bfcb7b61d33795919cb0ade;hpb=61180ab6f4b85ab78de2eaf1bc1b974c9e7908af;p=akkoma
diff --git a/lib/pleroma/web/views/embed_view.ex b/lib/pleroma/web/views/embed_view.ex
index 5f50bd155..81e196730 100644
--- a/lib/pleroma/web/views/embed_view.ex
+++ b/lib/pleroma/web/views/embed_view.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.EmbedView do
@@ -17,6 +17,8 @@ defmodule Pleroma.Web.EmbedView do
use Phoenix.HTML
+ defdelegate full_nickname(user), to: User
+
@media_types ["image", "audio", "video"]
defp fetch_media_type(%{"mediaType" => mediaType}) do
@@ -30,11 +32,6 @@ defmodule Pleroma.Web.EmbedView do
)
end
- defp full_nickname(user) do
- %{host: host} = URI.parse(user.ap_id)
- "@" <> user.nickname <> "@" <> host
- end
-
defp status_title(%Activity{object: %Object{data: %{"name" => name}}}) when is_binary(name),
do: name