X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=docs%2Fdev.md;h=aa89a941fdfe3e011150a7115f47e372fbc12a2f;hb=e1a2e8b17cca0d9f50b72fcea0ec5ffb8e613db1;hp=22e0691f14e35e906bbb4a1a546874e4d0606b77;hpb=78cea44553c936813ffc2c4c47984a64255096ef;p=akkoma diff --git a/docs/dev.md b/docs/dev.md index 22e0691f1..aa89a941f 100644 --- a/docs/dev.md +++ b/docs/dev.md @@ -21,3 +21,26 @@ This document contains notes and guidelines for Pleroma developers. ## Auth-related configuration, OAuth consumer mode etc. See `Authentication` section of [the configuration cheatsheet](configuration/cheatsheet.md#authentication). + +## 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 map with special structure. + +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] + } + ] + } +```