Add tests, change default config values, fix a bug
This commit is contained in:
parent
bef9b9cb66
commit
d943c90249
3 changed files with 59 additions and 7 deletions
|
|
@ -47,14 +47,16 @@ defmodule Pleroma.Web.ActivityPub.MRF.HellthreadPolicy do
|
|||
follower_collection = User.get_cached_by_ap_id(message["actor"]).follower_address
|
||||
|
||||
if Enum.member?(recipients, "https://www.w3.org/ns/activitystreams#Public") do
|
||||
recipients
|
||||
|> List.delete("https://www.w3.org/ns/activitystreams#Public")
|
||||
|> List.delete(follower_collection)
|
||||
recipients =
|
||||
recipients
|
||||
|> List.delete("https://www.w3.org/ns/activitystreams#Public")
|
||||
|> List.delete(follower_collection)
|
||||
|
||||
{:public, length(recipients)}
|
||||
else
|
||||
recipients
|
||||
|> List.delete(follower_collection)
|
||||
recipients =
|
||||
recipients
|
||||
|> List.delete(follower_collection)
|
||||
|
||||
{:not_public, length(recipients)}
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue