X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=docs%2Fdev.md;h=765380a58e3d504b0c13fcfc9b5723f480188d63;hb=2597b028f797c74eb16e7cd5bfc251dfe03ad934;hp=ba2718673168bdaf152cea9bb3781621c5d99ae7;hpb=04f6b48ac1a76fe9c6c3fd573427d418bc152adf;p=akkoma diff --git a/docs/dev.md b/docs/dev.md index ba2718673..765380a58 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] + } + ] + } +```