Merge remote-tracking branch 'upstream/develop' into media-proxy
This commit is contained in:
commit
72f7baa654
28 changed files with 126 additions and 32 deletions
|
|
@ -26,7 +26,7 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
|
|||
|
||||
user_info = User.get_cached_user_info(user)
|
||||
|
||||
%{
|
||||
data = %{
|
||||
"created_at" => user.inserted_at |> Utils.format_naive_asctime,
|
||||
"description" => HtmlSanitizeEx.strip_tags(user.bio),
|
||||
"favourites_count" => 0,
|
||||
|
|
@ -48,6 +48,12 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
|
|||
"cover_photo" => image_url(user.info["banner"]) |> MediaProxy.url(),
|
||||
"background_image" => image_url(user.info["background"]) |> MediaProxy.url(),
|
||||
}
|
||||
|
||||
if assigns[:token] do
|
||||
Map.put(data, "token", assigns[:token])
|
||||
else
|
||||
data
|
||||
end
|
||||
end
|
||||
|
||||
def render("short.json", %{user: %User{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue