Merge branch '1031-parent-visible' into 'develop'
Resolve "Add `pleroma.parent_visible` to the status view" Closes #1031 See merge request pleroma/pleroma!2679
This commit is contained in:
commit
577da132da
6 changed files with 31 additions and 5 deletions
|
|
@ -226,7 +226,8 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
|||
expires_at: nil,
|
||||
direct_conversation_id: nil,
|
||||
thread_muted: false,
|
||||
emoji_reactions: []
|
||||
emoji_reactions: [],
|
||||
parent_visible: false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -620,4 +621,20 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
|||
|
||||
assert status.visibility == "list"
|
||||
end
|
||||
|
||||
test "has a field for parent visibility" do
|
||||
user = insert(:user)
|
||||
poster = insert(:user)
|
||||
|
||||
{:ok, invisible} = CommonAPI.post(poster, %{status: "hey", visibility: "private"})
|
||||
|
||||
{:ok, visible} =
|
||||
CommonAPI.post(poster, %{status: "hey", visibility: "private", in_reply_to_id: invisible.id})
|
||||
|
||||
status = StatusView.render("show.json", activity: visible, for: user)
|
||||
refute status.pleroma.parent_visible
|
||||
|
||||
status = StatusView.render("show.json", activity: visible, for: poster)
|
||||
assert status.pleroma.parent_visible
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue