type: [:module, {:list, :module}],
description:
"A list of MRF policies enabled. Module names are shortened (removed leading `Pleroma.Web.ActivityPub.MRF.` part), but on adding custom module you need to use full name.",
- suggestions: {:list_behaviour_implementations, Pleroma.Web.ActivityPub.MRF}
+ suggestions: {:list_behaviour_implementations, Pleroma.Web.ActivityPub.MRF.Policy}
},
%{
key: :transparency,
suggestions: [
"exclusion.com"
]
+ },
+ %{
+ key: :transparency_obfuscate_domains,
+ label: "MRF domain obfuscation",
+ type: {:list, :string},
+ description:
+ "Obfuscate domains in MRF transparency. This is useful if the domain you're blocking contains words you don't want displayed, but still want to disclose the MRF settings.",
+ suggestions: [
+ "badword.com"
+ ]
}
]
}
def get_policies do
Pleroma.Config.get([:mrf, :policies], [])
|> get_policies()
- |> Enum.concat([Pleroma.Web.ActivityPub.MRF.HashtagPolicy])
+ |> Enum.concat([
+ Pleroma.Web.ActivityPub.MRF.HashtagPolicy,
+ Pleroma.Web.ActivityPub.MRF.InlineQuotePolicy
+ ])
+ |> Enum.uniq()
end
defp get_policies(policy) when is_atom(policy), do: [policy]
[description | acc]
else
Logger.warn(
- "#{policy} config description doesn't have one or all required keys #{
- inspect(@required_description_keys)
- }"
+ "#{policy} config description doesn't have one or all required keys #{inspect(@required_description_keys)}"
)
acc