projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'feat/rich-media-improvements' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
mrf
/
simple_policy.ex
diff --git
a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex
b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex
index ffaac767e78ef4d1180d04105fe729f22e0e1396..bb193475ab12a47f0aa6967584368b36b3373f33 100644
(file)
--- a/
lib/pleroma/web/activity_pub/mrf/simple_policy.ex
+++ b/
lib/pleroma/web/activity_pub/mrf/simple_policy.ex
@@
-109,6
+109,10
@@
defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
{:ok, object}
end
{:ok, object}
end
+ defp intersection(list1, list2) do
+ list1 -- list1 -- list2
+ end
+
defp check_followers_only(%{host: actor_host} = _actor_info, object) do
followers_only =
Config.get([:mrf_simple, :followers_only])
defp check_followers_only(%{host: actor_host} = _actor_info, object) do
followers_only =
Config.get([:mrf_simple, :followers_only])
@@
-125,8
+129,8
@@
defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
cc = FollowingRelationship.followers_ap_ids(user, fixed_cc)
object
cc = FollowingRelationship.followers_ap_ids(user, fixed_cc)
object
- |> Map.put("to",
[user.follower_address] ++ to
)
- |> Map.put("cc",
cc
)
+ |> Map.put("to",
intersection([user.follower_address | to], fixed_to)
)
+ |> Map.put("cc",
intersection([user.follower_address | cc], fixed_cc)
)
else
_ -> object
end
else
_ -> object
end