rename ftl_removal to federated_timeline_removal to keep consistent naming with SimplePolicy

This commit is contained in:
rinpatch 2019-02-08 13:12:09 +03:00
parent 2174f6eb4f
commit 8a0b755c19
3 changed files with 3 additions and 3 deletions
config
docs
lib/pleroma/web/activity_pub/mrf

View file

@ -240,7 +240,7 @@
config :pleroma, :mrf_keyword,
reject: [],
ftl_removal: [],
federated_timeline_removal: [],
replace: []
config :pleroma, :rich_media, enabled: true

View file

@ -153,7 +153,7 @@ This section is used to configure Pleroma-FE, unless ``:managed_config`` in ``:i
## :mrf_keyword
* `reject`: A list of patterns which result in message being rejected, each pattern can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html)
* `ftl_removal`: A list of patterns which result in message being removed from federated timelines(a.k.a unlisted), each pattern can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html)
* `federated_timeline_removal`: A list of patterns which result in message being removed from federated timelines(a.k.a unlisted), each pattern can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html)
* `replace`: A list of tuples containing `{pattern, replacement`, `pattern` can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html)
## :media_proxy

View file

@ -24,7 +24,7 @@ defp check_reject(%{"object" => %{"content" => content}} = message) do
defp check_ftl_removal(%{"to" => to, "object" => %{"content" => content}} = message) do
if "https://www.w3.org/ns/activitystreams#Public" in to and
Enum.any?(Pleroma.Config.get([:mrf_keyword, :ftl_removal]), fn pattern ->
Enum.any?(Pleroma.Config.get([:mrf_keyword, :federated_timeline_removal]), fn pattern ->
string_matches?(content, pattern)
end) do
to = List.delete(to, "https://www.w3.org/ns/activitystreams#Public")