projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Revert "Add remote follow pages.""
[akkoma]
/
lib
/
pleroma
/
web
/
twitter_api
/
views
/
user_view.ex
diff --git
a/lib/pleroma/web/twitter_api/views/user_view.ex
b/lib/pleroma/web/twitter_api/views/user_view.ex
index eeef1c0374d74ae87c7890b658316ec19cdbc7b4..1b995f42fea3322a901febd16750214338ef4264 100644
(file)
--- a/
lib/pleroma/web/twitter_api/views/user_view.ex
+++ b/
lib/pleroma/web/twitter_api/views/user_view.ex
@@
-26,7
+26,7
@@
defmodule Pleroma.Web.TwitterAPI.UserView do
user_info = User.get_cached_user_info(user)
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,
"created_at" => user.inserted_at |> Utils.format_naive_asctime,
"description" => HtmlSanitizeEx.strip_tags(user.bio),
"favourites_count" => 0,
@@
-45,9
+45,15
@@
defmodule Pleroma.Web.TwitterAPI.UserView do
"screen_name" => user.nickname,
"statuses_count" => user_info[:note_count],
"statusnet_profile_url" => user.ap_id,
"screen_name" => user.nickname,
"statuses_count" => user_info[:note_count],
"statusnet_profile_url" => user.ap_id,
- "cover_photo" =>
image_url(user.info["banner"]
) |> MediaProxy.url(),
+ "cover_photo" =>
User.banner_url(user
) |> MediaProxy.url(),
"background_image" => image_url(user.info["background"]) |> 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{
end
def render("short.json", %{user: %User{