twitter api: add no_rich_text option to userview for account prefs
This commit is contained in:
parent
ec6a7799d8
commit
56577d8b48
@ -64,7 +64,8 @@ def render("user.json", %{user: user = %User{}} = assigns) do
|
|||||||
"background_image" => image_url(user.info["background"]) |> MediaProxy.url(),
|
"background_image" => image_url(user.info["background"]) |> MediaProxy.url(),
|
||||||
"is_local" => user.local,
|
"is_local" => user.local,
|
||||||
"locked" => !!user.info["locked"],
|
"locked" => !!user.info["locked"],
|
||||||
"default_scope" => user.info["default_scope"] || "public"
|
"default_scope" => user.info["default_scope"] || "public",
|
||||||
|
"no_rich_text" => user.info["no_rich_text"] || false
|
||||||
}
|
}
|
||||||
|
|
||||||
if assigns[:token] do
|
if assigns[:token] do
|
||||||
|
@ -87,7 +87,8 @@ test "A user" do
|
|||||||
"background_image" => nil,
|
"background_image" => nil,
|
||||||
"is_local" => true,
|
"is_local" => true,
|
||||||
"locked" => false,
|
"locked" => false,
|
||||||
"default_scope" => "public"
|
"default_scope" => "public",
|
||||||
|
"no_rich_text" => false
|
||||||
}
|
}
|
||||||
|
|
||||||
assert represented == UserView.render("show.json", %{user: user})
|
assert represented == UserView.render("show.json", %{user: user})
|
||||||
@ -126,7 +127,8 @@ test "A user for a given other follower", %{user: user} do
|
|||||||
"background_image" => nil,
|
"background_image" => nil,
|
||||||
"is_local" => true,
|
"is_local" => true,
|
||||||
"locked" => false,
|
"locked" => false,
|
||||||
"default_scope" => "public"
|
"default_scope" => "public",
|
||||||
|
"no_rich_text" => false
|
||||||
}
|
}
|
||||||
|
|
||||||
assert represented == UserView.render("show.json", %{user: user, for: follower})
|
assert represented == UserView.render("show.json", %{user: user, for: follower})
|
||||||
@ -166,7 +168,8 @@ test "A user that follows you", %{user: user} do
|
|||||||
"background_image" => nil,
|
"background_image" => nil,
|
||||||
"is_local" => true,
|
"is_local" => true,
|
||||||
"locked" => false,
|
"locked" => false,
|
||||||
"default_scope" => "public"
|
"default_scope" => "public",
|
||||||
|
"no_rich_text" => false
|
||||||
}
|
}
|
||||||
|
|
||||||
assert represented == UserView.render("show.json", %{user: follower, for: user})
|
assert represented == UserView.render("show.json", %{user: follower, for: user})
|
||||||
@ -213,7 +216,8 @@ test "A blocked user for the blocker" do
|
|||||||
"background_image" => nil,
|
"background_image" => nil,
|
||||||
"is_local" => true,
|
"is_local" => true,
|
||||||
"locked" => false,
|
"locked" => false,
|
||||||
"default_scope" => "public"
|
"default_scope" => "public",
|
||||||
|
"no_rich_text" => false
|
||||||
}
|
}
|
||||||
|
|
||||||
blocker = Repo.get(User, blocker.id)
|
blocker = Repo.get(User, blocker.id)
|
||||||
|
Loading…
Reference in New Issue
Block a user