mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-18 15:14:42 +00:00
Fix recipient count in hellthread policy
This commit is contained in:
parent
1ce1b7b58d
commit
8f98d970c1
1 changed files with 3 additions and 3 deletions
|
@ -12,14 +12,14 @@ defmodule Pleroma.Web.ActivityPub.MRF.HellthreadPolicy do
|
|||
follower_collection? = Enum.member?(message["to"] ++ message["cc"], follower_collection)
|
||||
|
||||
message =
|
||||
case recipients = get_recipient_count(message) do
|
||||
{:public, _}
|
||||
case get_recipient_count(message) do
|
||||
{:public, recipients}
|
||||
when follower_collection? and recipients > threshold ->
|
||||
message
|
||||
|> Map.put("to", [follower_collection])
|
||||
|> Map.put("cc", ["https://www.w3.org/ns/activitystreams#Public"])
|
||||
|
||||
{:public, _} when recipients > threshold ->
|
||||
{:public, recipients} when recipients > threshold ->
|
||||
message
|
||||
|> Map.put("to", [])
|
||||
|> Map.put("cc", ["https://www.w3.org/ns/activitystreams#Public"])
|
||||
|
|
Loading…
Reference in a new issue