Skip to content
Snippets Groups Projects

WIP: Add a management API for keyword policies

Closed Hécate requested to merge (removed):keyword_policy/mgmt_api into develop

This MR is built on #612 (closed) and the subsequent discussions that happened.

Additions

It implemements three basic actions on keyword policies:

  1. POST /save
  2. GET /list
  3. DELETE /reset

Changes

  1. 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.
  2. In the NodeInfo controller, Keyword Policy aggregation and formatting has been moved to the Pleroma.Web.ActivityPub.MRF.KeywordPolicy module.

Notes

  1. 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.

  2. Cachex will not be used (in this MR at least) to store keyword policies

TODO

  • Unit tests on the new functions
  • Deprecation warning

@rinpatch
@lambadalambda
@feld
@kaniini

Edited by Hécate

Merge request reports

Closed by avatar (Jan 4, 2025 10:47pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading