summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2020-08-18 02:01:40 +0200
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2020-08-18 02:02:20 +0200
commitb1fc4fe0ca6abab97be69e0b1bf138e8b5c1c303 (patch)
tree97fb36da050aedb44ab1e60ff846e77e768e4c58
parent34b099fffa64c20d42c417abb06e0e32a5ad296a (diff)
fetcher: fallback to [] when to/cc is nil
Related: https://git.pleroma.social/pleroma/pleroma/-/issues/2063
-rw-r--r--lib/pleroma/object/fetcher.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/object/fetcher.ex b/lib/pleroma/object/fetcher.ex
index 3ff25118d..6fdbc8efd 100644
--- a/lib/pleroma/object/fetcher.ex
+++ b/lib/pleroma/object/fetcher.ex
@@ -125,8 +125,8 @@ defmodule Pleroma.Object.Fetcher do
defp prepare_activity_params(data) do
%{
"type" => "Create",
- "to" => data["to"],
- "cc" => data["cc"],
+ "to" => data["to"] || [],
+ "cc" => data["cc"] || [],
# Should we seriously keep this attributedTo thing?
"actor" => data["actor"] || data["attributedTo"],
"object" => data