Merge branch 'develop' into fix/reject-third-party-reports
This commit is contained in:
commit
68e4bb53a2
3 changed files with 22 additions and 0 deletions
|
|
@ -103,6 +103,26 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
|
|||
refute "Flag" |> Pleroma.Activity.Queries.by_type() |> Pleroma.Repo.one()
|
||||
end
|
||||
|
||||
test "it accepts Flag activities with just actor id as object" do
|
||||
user = insert(:user)
|
||||
other_user = insert(:user)
|
||||
|
||||
message = %{
|
||||
"@context" => "https://www.w3.org/ns/activitystreams",
|
||||
"cc" => [user.ap_id],
|
||||
"object" => user.ap_id,
|
||||
"type" => "Flag",
|
||||
"content" => "blocked AND reported!!!",
|
||||
"actor" => other_user.ap_id
|
||||
}
|
||||
|
||||
assert {:ok, activity} = Transmogrifier.handle_incoming(message)
|
||||
|
||||
assert activity.data["content"] == "blocked AND reported!!!"
|
||||
assert activity.data["actor"] == other_user.ap_id
|
||||
assert activity.data["cc"] == [user.ap_id]
|
||||
end
|
||||
|
||||
test "it accepts Move activities" do
|
||||
old_user = insert(:user)
|
||||
new_user = insert(:user)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue