projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Set the correct height/width if the data is available when generating twittercard...
[akkoma]
/
lib
/
pleroma
/
web
/
views
/
embed_view.ex
diff --git
a/lib/pleroma/web/views/embed_view.ex
b/lib/pleroma/web/views/embed_view.ex
index cb7600adbaf3f1952f05ed3ba01d22286dfe16a7..81e19673038d46e052378512ffcc71895dd5dd77 100644
(file)
--- a/
lib/pleroma/web/views/embed_view.ex
+++ b/
lib/pleroma/web/views/embed_view.ex
@@
-17,6
+17,8
@@
defmodule Pleroma.Web.EmbedView do
use Phoenix.HTML
use Phoenix.HTML
+ defdelegate full_nickname(user), to: User
+
@media_types ["image", "audio", "video"]
defp fetch_media_type(%{"mediaType" => mediaType}) do
@media_types ["image", "audio", "video"]
defp fetch_media_type(%{"mediaType" => mediaType}) do
@@
-30,11
+32,6
@@
defmodule Pleroma.Web.EmbedView do
)
end
)
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
defp status_title(%Activity{object: %Object{data: %{"name" => name}}}) when is_binary(name),
do: name