X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=docs%2Fdev.md;h=aa89a941fdfe3e011150a7115f47e372fbc12a2f;hb=1d03ba4ffbb73b54a7caa107a6b9a85fa65ecfd4;hp=22e0691f14e35e906bbb4a1a546874e4d0606b77;hpb=409f694e4f90d34285b43c7e7afc594bc386d893;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] + } + ] + } +```