logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/
commit: fc15c25889835e45f24b533f610196ae117459a7
parent 4c537534ad5089c9efd75087b3cbfaaa71404b6e
Author: Lain Soykaf <lain@lain.com>
Date:   Thu, 25 Dec 2025 12:50:55 +0400

Transmogrifier: Only set replies on objects, not activities.

Diffstat:

Mlib/pleroma/web/activity_pub/transmogrifier.ex7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex @@ -742,8 +742,9 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do Inline first page of the `replies` collection, containing any replies in chronological order. """ - def set_replies(obj_data) do - with obj_ap_id when obj_ap_id != nil <- obj_data["id"], + def set_replies(%{"type" => type} = obj_data) + when type in Pleroma.Constants.status_object_types() do + with obj_ap_id when is_binary(obj_ap_id) <- obj_data["id"], limit when limit > 0 <- Pleroma.Config.get([:activitypub, :note_replies_output_limit], 0), collection <- @@ -757,6 +758,8 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do end end + def set_replies(obj_data), do: obj_data + # Prepares the object of an outgoing create activity. def prepare_object(object) do object