From: Haelwenn (lanodan) Monnier Date: Tue, 18 Aug 2020 00:01:40 +0000 (+0200) Subject: fetcher: fallback to [] when to/cc is nil X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=b1fc4fe0ca6abab97be69e0b1bf138e8b5c1c303;p=akkoma fetcher: fallback to [] when to/cc is nil Related: https://git.pleroma.social/pleroma/pleroma/-/issues/2063 --- 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