transmogrifier: Call strip_internal_fields on pipeline ingestion

This commit is contained in:
Haelwenn (lanodan) Monnier 2020-08-25 09:19:53 +02:00
parent 6316350918
commit b73e9ef686
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE

View file

@ -550,6 +550,8 @@ def handle_incoming(
_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}