fetcher: fallback to [] when to/cc is nil

Related: https://git.pleroma.social/pleroma/pleroma/-/issues/2063
This commit is contained in:
Haelwenn (lanodan) Monnier 2020-08-18 02:01:40 +02:00
parent 34b099fffa
commit b1fc4fe0ca
No known key found for this signature in database
GPG Key ID: D5B7A8E43C997DEE
1 changed files with 2 additions and 2 deletions

View File

@ -125,8 +125,8 @@ def fetch_object_from_id(id, options \\ []) do
defp prepare_activity_params(data) do defp prepare_activity_params(data) do
%{ %{
"type" => "Create", "type" => "Create",
"to" => data["to"], "to" => data["to"] || [],
"cc" => data["cc"], "cc" => data["cc"] || [],
# Should we seriously keep this attributedTo thing? # Should we seriously keep this attributedTo thing?
"actor" => data["actor"] || data["attributedTo"], "actor" => data["actor"] || data["attributedTo"],
"object" => data "object" => data