Fix federation issue where Public visibility information in cc field was lost when sent to remote servers, causing posts to appear with inconsistent visibility across instances

This commit is contained in:
Mark Felder 2025-06-12 21:37:50 -07:00
commit 23be24b92f
2 changed files with 15 additions and 1 deletions

View file

@ -0,0 +1 @@
Fix federation issue where Public visibility information in cc field was lost when sent to remote servers, causing posts to appear with inconsistent visibility across instances

View file

@ -93,7 +93,20 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
{:ok, data} = Transmogrifier.prepare_outgoing(activity.data) {:ok, data} = Transmogrifier.prepare_outgoing(activity.data)
cc = Map.get(params, :cc, []) param_cc = Map.get(params, :cc, [])
original_cc = Map.get(data, "cc", [])
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.
cc =
if public_address in original_cc and param_cc == [] do
[public_address]
else
param_cc
end
json = json =
data data