+ to = message["to"] || []
+ cc = message["cc"] || []
+
+ follower_collection? = Enum.member?(to ++ cc, follower_collection)
+
+ message =
+ case get_recipient_count(message) do
+ {:public, recipients}
+ when follower_collection? and recipients > threshold ->
+ message
+ |> Map.put("to", [follower_collection])
+ |> Map.put("cc", [Pleroma.Constants.as_public()])
+
+ {:public, recipients} when recipients > threshold ->
+ message
+ |> Map.put("to", [])
+ |> Map.put("cc", [Pleroma.Constants.as_public()])