object_validators: Group common fields in CommonValidations
Notes: - QuestionValidator didn't have a :name field but that seems like a mistake - `_fields` functions can't inherit others because of some Validators - bto/bcc fields were absent in activities, also seems like a mistake (Well IIRC we don't or barely support bto/bcc anyway)
This commit is contained in:
parent
390ceb9f94
commit
23161526d4
19 changed files with 211 additions and 223 deletions
|
|
@ -67,7 +67,9 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AddRemoveHandlingTest do
|
|||
"target" => "https://example.com/users/lain/collections/featured",
|
||||
"type" => "Add",
|
||||
"to" => [Pleroma.Constants.as_public()],
|
||||
"cc" => ["https://example.com/users/lain/followers"]
|
||||
"cc" => ["https://example.com/users/lain/followers"],
|
||||
"bcc" => [],
|
||||
"bto" => []
|
||||
}
|
||||
|
||||
assert {:ok, activity} = Transmogrifier.handle_incoming(message)
|
||||
|
|
@ -82,7 +84,9 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AddRemoveHandlingTest do
|
|||
"target" => "https://example.com/users/lain/collections/featured",
|
||||
"type" => "Remove",
|
||||
"to" => [Pleroma.Constants.as_public()],
|
||||
"cc" => ["https://example.com/users/lain/followers"]
|
||||
"cc" => ["https://example.com/users/lain/followers"],
|
||||
"bcc" => [],
|
||||
"bto" => []
|
||||
}
|
||||
|
||||
assert {:ok, activity} = Transmogrifier.handle_incoming(remove)
|
||||
|
|
@ -161,7 +165,9 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.AddRemoveHandlingTest do
|
|||
"target" => "https://#{host}/users/#{user.nickname}/collections/featured",
|
||||
"type" => "Add",
|
||||
"to" => [Pleroma.Constants.as_public()],
|
||||
"cc" => ["https://#{host}/users/#{user.nickname}/followers"]
|
||||
"cc" => ["https://#{host}/users/#{user.nickname}/followers"],
|
||||
"bcc" => [],
|
||||
"bto" => []
|
||||
}
|
||||
|
||||
assert {:ok, activity} = Transmogrifier.handle_incoming(message)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue