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 5f50bd155b7baa6d3bfcb7b61d33795919cb0ade..81e19673038d46e052378512ffcc71895dd5dd77 100644
(file)
--- 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
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.EmbedView do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.EmbedView do
@@
-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