summaryrefslogtreecommitdiff
path: root/docs/configuration/mrf.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/configuration/mrf.md')
-rw-r--r--docs/configuration/mrf.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/configuration/mrf.md b/docs/configuration/mrf.md
index 31c66e098..9e8c0a2d7 100644
--- a/docs/configuration/mrf.md
+++ b/docs/configuration/mrf.md
@@ -133,3 +133,26 @@ config :pleroma, :mrf,
```
Please note that the Pleroma developers consider custom MRF policy modules to fall under the purview of the AGPL. As such, you are obligated to release the sources to your custom MRF policy modules upon request.
+
+### MRF policies descriptions
+
+If MRF policy depends on config, it can be added into MRF tab to adminFE by adding `config_description/0` method, which returns a map with a specific structure. See existing MRF's like `lib/pleroma/web/activity_pub/mrf/activity_expiration_policy.ex` for examples. Note that more complex inputs, like tuples or maps, may need extra changes in the adminFE and just adding it to `config_description/0` may not be enough to get these inputs working from the adminFE.
+
+Example:
+
+```elixir
+%{
+ key: :mrf_activity_expiration,
+ related_policy: "Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy",
+ label: "MRF Activity Expiration Policy",
+ description: "Adds automatic expiration to all local activities",
+ children: [
+ %{
+ key: :days,
+ type: :integer,
+ description: "Default global expiration time for all local activities (in days)",
+ suggestions: [90, 365]
+ }
+ ]
+ }
+```