mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 02:05:12 +00:00
Merge branch 'bugfix/mastofe_thread_render' into 'develop'
lib/pleroma/web/mastodon_api/views/status_view.ex: Fix status.json so it renders threads See merge request pleroma/pleroma!223
This commit is contained in:
commit
a938d07df1
|
@ -125,8 +125,8 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
|
||||||
uri: object["id"],
|
uri: object["id"],
|
||||||
url: object["external_url"] || object["id"],
|
url: object["external_url"] || object["id"],
|
||||||
account: AccountView.render("account.json", %{user: user}),
|
account: AccountView.render("account.json", %{user: user}),
|
||||||
in_reply_to_id: reply_to && reply_to.id,
|
in_reply_to_id: reply_to && to_string(reply_to.id),
|
||||||
in_reply_to_account_id: reply_to_user && reply_to_user.id,
|
in_reply_to_account_id: reply_to_user && to_string(reply_to_user.id),
|
||||||
reblog: nil,
|
reblog: nil,
|
||||||
content: HtmlSanitizeEx.basic_html(object["content"]),
|
content: HtmlSanitizeEx.basic_html(object["content"]),
|
||||||
created_at: created_at,
|
created_at: created_at,
|
||||||
|
|
|
@ -64,11 +64,11 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
||||||
|
|
||||||
status = StatusView.render("status.json", %{activity: activity})
|
status = StatusView.render("status.json", %{activity: activity})
|
||||||
|
|
||||||
assert status.in_reply_to_id == note.id
|
assert status.in_reply_to_id == to_string(note.id)
|
||||||
|
|
||||||
[status] = StatusView.render("index.json", %{activities: [activity], as: :activity})
|
[status] = StatusView.render("index.json", %{activities: [activity], as: :activity})
|
||||||
|
|
||||||
assert status.in_reply_to_id == note.id
|
assert status.in_reply_to_id == to_string(note.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
test "contains mentions" do
|
test "contains mentions" do
|
||||||
|
|
Loading…
Reference in a new issue