From 7c64bfaace454185c4428fec0e7247ba93fff048 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 12 Jun 2025 22:42:40 -0700 Subject: [PATCH] Include public address in cc if original activity specified it and Publisher param_cc also has values --- lib/pleroma/web/activity_pub/publisher.ex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/pleroma/web/activity_pub/publisher.ex b/lib/pleroma/web/activity_pub/publisher.ex index 762c991fd..f160f1e17 100644 --- a/lib/pleroma/web/activity_pub/publisher.ex +++ b/lib/pleroma/web/activity_pub/publisher.ex @@ -99,11 +99,11 @@ defmodule Pleroma.Web.ActivityPub.Publisher do public_address = Pleroma.Constants.as_public() - # Avoid overriding explicitly set cc values for specific recipients. - # e.g., this ensures unlisted posts are visible to users on other servers. + # Ensure unlisted posts don't lose the public address in the cc + # if the param_cc was set cc = - if public_address in original_cc and param_cc == [] do - [public_address] + if public_address in original_cc and public_address not in param_cc do + [public_address | param_cc] else param_cc end