Test for unlisted but Publisher param_cc is not empty
This commit is contained in:
parent
d3adc3e05e
commit
fe6d2ecc97
1 changed files with 22 additions and 0 deletions
|
|
@ -546,6 +546,28 @@ defmodule Pleroma.Web.ActivityPub.PublisherTest do
|
||||||
{:ok, decoded} = Jason.decode(prepared.json)
|
{:ok, decoded} = Jason.decode(prepared.json)
|
||||||
|
|
||||||
assert @as_public in decoded["cc"]
|
assert @as_public in decoded["cc"]
|
||||||
|
|
||||||
|
# maybe we also have another inbox in cc
|
||||||
|
# during Publishing
|
||||||
|
activity =
|
||||||
|
insert(:note_activity,
|
||||||
|
user: user,
|
||||||
|
data_attrs: %{
|
||||||
|
"cc" => [@as_public],
|
||||||
|
"to" => [user.follower_address]
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
prepared =
|
||||||
|
Publisher.prepare_one(%{
|
||||||
|
inbox: "https://remote.instance/users/someone/inbox",
|
||||||
|
activity_id: activity.id,
|
||||||
|
cc: ["https://remote.instance/users/someone_else/inbox"]
|
||||||
|
})
|
||||||
|
|
||||||
|
{:ok, decoded} = Jason.decode(prepared.json)
|
||||||
|
|
||||||
|
assert decoded["cc"] == [@as_public, "https://remote.instance/users/someone_else/inbox"]
|
||||||
end
|
end
|
||||||
|
|
||||||
test "public address in cc parameter is preserved" do
|
test "public address in cc parameter is preserved" do
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue