Commit 8a0b755c authored by rinpatch's avatar rinpatch

rename ftl_removal to federated_timeline_removal to keep consistent naming with SimplePolicy

parent 2174f6eb
......@@ -240,7 +240,7 @@ config :pleroma, :mrf_simple,
config :pleroma, :mrf_keyword,
reject: [],
ftl_removal: [],
federated_timeline_removal: [],
replace: []
config :pleroma, :rich_media, enabled: true
......
......@@ -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
......
......@@ -24,7 +24,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.KeywordPolicy 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")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment