The source project of this merge request has been removed.
WIP: Add a management API for keyword policies
This MR is built on #612 (closed) and the subsequent discussions that happened.
Additions
It implemements three basic actions on keyword policies:
- POST
/save
- GET
/list
- DELETE
/reset
Changes
- The format for replacement rules in
config/config.exs
changed from a list of tuples (aka: Keyword) to a Map.
Documentation has been modified accordingly. - In the NodeInfo controller, Keyword Policy aggregation and formatting has been moved to the
Pleroma.Web.ActivityPub.MRF.KeywordPolicy
module.
Notes
-
During this MR, an attempt was made to formalize the shape of the data with Ecto, which led to #644 (closed).
It was then decided (by myself) that any effort to implement the results of what was suggested in #644 (closed) would take place in another MR. -
Cachex will not be used (in this MR at least) to store keyword policies
TODO
-
Unit tests on the new functions -
Deprecation warning
Edited by Hécate