transmogrifier: Call strip_internal_fields on pipeline ingestion
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Tue, 25 Aug 2020 07:19:53 +0000 (09:19 +0200)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Thu, 10 Sep 2020 23:39:38 +0000 (01:39 +0200)
lib/pleroma/web/activity_pub/transmogrifier.ex

index af4384213bf48c5558eb6b675ec32360c028adf0..ec3b24206a92281cf155a46a0271d65a2190d89d 100644 (file)
@@ -550,6 +550,8 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
         _options
       )
       when objtype in ~w{Question Answer ChatMessage Audio Event} do
+    data = Map.put(data, "object", strip_internal_fields(data["object"]))
+
     with {:ok, %User{}} <- ObjectValidator.fetch_actor(data),
          {:ok, activity, _} <- Pipeline.common_pipeline(data, local: false) do
       {:ok, activity}