MRF: create MRF.Policy behaviour separate from MRF module

Speeds up recompilation by reducing compile-time deps
This commit is contained in:
Alex Gleason 2021-06-07 14:22:08 -05:00
commit fe4c4a7178
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
29 changed files with 43 additions and 38 deletions

View file

@ -82,7 +82,7 @@ For example, here is a sample policy module which rewrites all messages to "new
```elixir
defmodule Pleroma.Web.ActivityPub.MRF.RewritePolicy do
@moduledoc "MRF policy which rewrites all Notes to have 'new message content'."
@behaviour Pleroma.Web.ActivityPub.MRF
@behaviour Pleroma.Web.ActivityPub.MRF.Policy
# Catch messages which contain Note objects with actual data to filter.
# Capture the object as `object`, the message content as `content` and the