logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

drop_policy.ex (577B)


  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. defmodule Pleroma.Web.ActivityPub.MRF.DropPolicy do
  5. require Logger
  6. @moduledoc "Drop and log everything received"
  7. @behaviour Pleroma.Web.ActivityPub.MRF.Policy
  8. @impl true
  9. def filter(object) do
  10. Logger.debug("REJECTING #{inspect(object)}")
  11. {:reject, object}
  12. end
  13. @impl true
  14. def id_filter(id) do
  15. Logger.debug("REJECTING #{id}")
  16. false
  17. end
  18. @impl true
  19. def describe, do: {:ok, %{}}
  20. end