Skip to content

message rewrite facility

This branch introduces the Message Rewrite Facility (MRF). The MRF is a configurable hook which acts on ActivityPub objects which have been normalized to Pleroma's ActivityPub-based IR.

The MRF hook is able to do any type of transformation to the message, including discarding it by returning {:reject, nil}.

Typical uses involve tasks such as:

  • marking messages from remote servers that have media with the NSFW tag
  • stripping attachments from messages for legal reasons
  • rewriting to/cc to remove messages from a given server from the federated timeline or other criteria
  • rejecting messages altogether based on a configured criteria

Other possible uses include forwarding messages silently to the admin team which meet a specific criteria, forwarding all messages to a bot, etc.

Edited by kaniini

Merge request reports