TwitterAPI: Add is_local to user view.
This commit is contained in:
parent
15cb3f2b01
commit
ab83e0de6d
@ -47,6 +47,7 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
|
||||
"statusnet_profile_url" => user.ap_id,
|
||||
"cover_photo" => User.banner_url(user) |> MediaProxy.url(),
|
||||
"background_image" => image_url(user.info["background"]) |> MediaProxy.url(),
|
||||
"is_local" => user.local
|
||||
}
|
||||
|
||||
if assigns[:token] do
|
||||
|
@ -56,7 +56,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do
|
||||
"rights" => %{},
|
||||
"statusnet_profile_url" => user.ap_id,
|
||||
"cover_photo" => banner,
|
||||
"background_image" => nil
|
||||
"background_image" => nil,
|
||||
"is_local" => true
|
||||
}
|
||||
|
||||
assert represented == UserView.render("show.json", %{user: user})
|
||||
@ -88,7 +89,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do
|
||||
"rights" => %{},
|
||||
"statusnet_profile_url" => user.ap_id,
|
||||
"cover_photo" => banner,
|
||||
"background_image" => nil
|
||||
"background_image" => nil,
|
||||
"is_local" => true
|
||||
}
|
||||
|
||||
assert represented == UserView.render("show.json", %{user: user, for: follower})
|
||||
@ -121,7 +123,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do
|
||||
"rights" => %{},
|
||||
"statusnet_profile_url" => follower.ap_id,
|
||||
"cover_photo" => banner,
|
||||
"background_image" => nil
|
||||
"background_image" => nil,
|
||||
"is_local" => true
|
||||
}
|
||||
|
||||
assert represented == UserView.render("show.json", %{user: follower, for: user})
|
||||
@ -154,7 +157,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do
|
||||
"rights" => %{},
|
||||
"statusnet_profile_url" => user.ap_id,
|
||||
"cover_photo" => banner,
|
||||
"background_image" => nil
|
||||
"background_image" => nil,
|
||||
"is_local" => true
|
||||
}
|
||||
|
||||
blocker = Repo.get(User, blocker.id)
|
||||
|
Loading…
Reference in New Issue
Block a user