From 5f54228e3805644e4abf0b8aca5987c6a7d9f416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Wed, 12 Oct 2022 23:54:49 +0200 Subject: [PATCH] Send event updates to participants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- lib/pleroma/web/activity_pub/builder.ex | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/pleroma/web/activity_pub/builder.ex b/lib/pleroma/web/activity_pub/builder.ex index 87cad7719c..687a06798c 100644 --- a/lib/pleroma/web/activity_pub/builder.ex +++ b/lib/pleroma/web/activity_pub/builder.ex @@ -243,13 +243,13 @@ def like(actor, object) do @spec update(User.t(), Object.t()) :: {:ok, map(), keyword()} def update(actor, object) do - {to, cc} = + {to, cc, bcc} = if object["type"] in Pleroma.Constants.actor_types() do # User updates, always public {[Pleroma.Constants.as_public(), actor.follower_address], []} else # Status updates, follow the recipients in the object - {object["to"] || [], object["cc"] || []} + {object["to"] || [], object["cc"] || [], object["participations"] || []} end {:ok, @@ -259,7 +259,8 @@ def update(actor, object) do "actor" => actor.ap_id, "object" => object, "to" => to, - "cc" => cc + "cc" => cc, + "bcc" => bcc }, []} end