0234de4d59744c3da51833520bdde23a8ed2a400
[anni] / lib / pleroma / web / activity_pub / mrf / policy.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.ActivityPub.MRF.Policy do
6   @callback filter(Map.t()) :: {:ok | :reject, Map.t()}
7   @callback describe() :: {:ok | :error, Map.t()}
8   @callback config_description() :: %{
9               optional(:children) => [map()],
10               key: atom(),
11               related_policy: String.t(),
12               label: String.t(),
13               description: String.t()
14             }
15   @callback history_awareness() :: :auto | :manual
16   @optional_callbacks config_description: 0, history_awareness: 0
17 end