logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: acef2a4a407058c6dfa4e18aaa9920ab1a82eb94
parent 0de1a7629c5dbf3f6fba69a41bbeff5947558899
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 25 Jan 2024 00:27:15 +0100

CommonFixes: Use Maps.filter_empty_values on fix_object_defaults

Diffstat:

Mlib/pleroma/web/activity_pub/object_validators/common_fixes.ex3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/pleroma/web/activity_pub/object_validators/common_fixes.ex b/lib/pleroma/web/activity_pub/object_validators/common_fixes.ex @@ -4,6 +4,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.CommonFixes do alias Pleroma.EctoType.ActivityPub.ObjectValidators + alias Pleroma.Maps alias Pleroma.Object alias Pleroma.Object.Containment alias Pleroma.User @@ -24,6 +25,8 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.CommonFixes do end def fix_object_defaults(data) do + data = Maps.filter_empty_values(data) + context = Utils.maybe_create_context( data["context"] || data["conversation"] || data["inReplyTo"] || data["id"]