extend reject MRF to check if originating instance is blocked
[akkoma] / lib / pleroma / web / activity_pub / mrf / drop_policy.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.ActivityPub.MRF.DropPolicy do
6 require Logger
7 @moduledoc "Drop and log everything received"
8 @behaviour Pleroma.Web.ActivityPub.MRF.Policy
9
10 @impl true
11 def filter(object) do
12 Logger.debug("REJECTING #{inspect(object)}")
13 {:reject, object}
14 end
15
16 @impl true
17 def describe, do: {:ok, %{}}
18 end