Merge branch 'bugfix/account_view_source.note' into 'develop'
MastoAPI AccountView: fill source.note with plaintext version of note Closes #926 See merge request pleroma/pleroma!1189
This commit is contained in:
commit
cdac5efd10
|
@ -112,7 +112,7 @@ defp do_render("account.json", %{user: user} = opts) do
|
||||||
fields: fields,
|
fields: fields,
|
||||||
bot: bot,
|
bot: bot,
|
||||||
source: %{
|
source: %{
|
||||||
note: "",
|
note: HTML.strip_tags((user.bio || "") |> String.replace("<br>", "\n")),
|
||||||
sensitive: false,
|
sensitive: false,
|
||||||
pleroma: %{}
|
pleroma: %{}
|
||||||
},
|
},
|
||||||
|
|
|
@ -55,7 +55,7 @@ test "Represent a user account" do
|
||||||
fields: [],
|
fields: [],
|
||||||
bot: false,
|
bot: false,
|
||||||
source: %{
|
source: %{
|
||||||
note: "",
|
note: "valid html",
|
||||||
sensitive: false,
|
sensitive: false,
|
||||||
pleroma: %{}
|
pleroma: %{}
|
||||||
},
|
},
|
||||||
|
@ -120,7 +120,7 @@ test "Represent a Service(bot) account" do
|
||||||
fields: [],
|
fields: [],
|
||||||
bot: true,
|
bot: true,
|
||||||
source: %{
|
source: %{
|
||||||
note: "",
|
note: user.bio,
|
||||||
sensitive: false,
|
sensitive: false,
|
||||||
pleroma: %{}
|
pleroma: %{}
|
||||||
},
|
},
|
||||||
|
@ -209,7 +209,7 @@ test "represent an embedded relationship" do
|
||||||
fields: [],
|
fields: [],
|
||||||
bot: true,
|
bot: true,
|
||||||
source: %{
|
source: %{
|
||||||
note: "",
|
note: user.bio,
|
||||||
sensitive: false,
|
sensitive: false,
|
||||||
pleroma: %{}
|
pleroma: %{}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue