|
|
@@ -51,17 +51,6 @@ defmodule Pleroma.Web.ActivityPub.MRF do |
|
|
|
|
|
|
|
@required_description_keys [:key, :related_policy] |
|
|
|
|
|
|
|
@callback filter(Map.t()) :: {:ok | :reject, Map.t()} |
|
|
|
@callback describe() :: {:ok | :error, Map.t()} |
|
|
|
@callback config_description() :: %{ |
|
|
|
optional(:children) => [map()], |
|
|
|
key: atom(), |
|
|
|
related_policy: String.t(), |
|
|
|
label: String.t(), |
|
|
|
description: String.t() |
|
|
|
} |
|
|
|
@optional_callbacks config_description: 0 |
|
|
|
|
|
|
|
def filter(policies, %{} = message) do |
|
|
|
policies |
|
|
|
|> Enum.reduce({:ok, message}, fn |
|
|
|