mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-23 09:44:52 +00:00
MastoAPI AccountView: fill source.note with plaintext version of note
Closes: https://git.pleroma.social/pleroma/pleroma/issues/926
This commit is contained in:
parent
b30b51c3b7
commit
0e2c215a00
|
@ -112,7 +112,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView 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 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
|
||||||
fields: [],
|
fields: [],
|
||||||
bot: false,
|
bot: false,
|
||||||
source: %{
|
source: %{
|
||||||
note: "",
|
note: "valid html",
|
||||||
sensitive: false,
|
sensitive: false,
|
||||||
pleroma: %{}
|
pleroma: %{}
|
||||||
},
|
},
|
||||||
|
@ -120,7 +120,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
|
||||||
fields: [],
|
fields: [],
|
||||||
bot: true,
|
bot: true,
|
||||||
source: %{
|
source: %{
|
||||||
note: "",
|
note: user.bio,
|
||||||
sensitive: false,
|
sensitive: false,
|
||||||
pleroma: %{}
|
pleroma: %{}
|
||||||
},
|
},
|
||||||
|
@ -209,7 +209,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
|
||||||
fields: [],
|
fields: [],
|
||||||
bot: true,
|
bot: true,
|
||||||
source: %{
|
source: %{
|
||||||
note: "",
|
note: user.bio,
|
||||||
sensitive: false,
|
sensitive: false,
|
||||||
pleroma: %{}
|
pleroma: %{}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue