Move get_favicon to Pleroma.Instances, use /
This commit is contained in:
parent
f6d09fafee
commit
6a679d80c9
7 changed files with 353 additions and 34 deletions
|
|
@ -204,6 +204,15 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
|
|||
%{}
|
||||
end
|
||||
|
||||
favicon =
|
||||
user
|
||||
|> Map.get(:ap_id, "")
|
||||
|> URI.parse()
|
||||
|> URI.merge("/")
|
||||
|> to_string()
|
||||
|> Pleroma.Instances.get_cached_favicon()
|
||||
|> MediaProxy.url()
|
||||
|
||||
%{
|
||||
id: to_string(user.id),
|
||||
username: username_from_nickname(user.nickname),
|
||||
|
|
@ -246,7 +255,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
|
|||
relationship: relationship,
|
||||
skip_thread_containment: user.skip_thread_containment,
|
||||
background_image: image_url(user.background) |> MediaProxy.url(),
|
||||
favicon: User.get_cached_favicon(user) |> MediaProxy.url()
|
||||
favicon: favicon
|
||||
}
|
||||
}
|
||||
|> maybe_put_role(user, opts[:for])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue