Include public address in cc if original activity specified it and Publisher param_cc also has values

This commit is contained in:
Mark Felder 2025-06-12 22:42:40 -07:00
commit 7c64bfaace

View file

@ -99,11 +99,11 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
public_address = Pleroma.Constants.as_public() public_address = Pleroma.Constants.as_public()
# Avoid overriding explicitly set cc values for specific recipients. # Ensure unlisted posts don't lose the public address in the cc
# e.g., this ensures unlisted posts are visible to users on other servers. # if the param_cc was set
cc = cc =
if public_address in original_cc and param_cc == [] do if public_address in original_cc and public_address not in param_cc do
[public_address] [public_address | param_cc]
else else
param_cc param_cc
end end