Standardize @behaviour usage in MRFs
This commit is contained in:
parent
9906c6fb6f
commit
478619782b
|
@ -5,12 +5,11 @@
|
||||||
defmodule Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy do
|
defmodule Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy do
|
||||||
alias Pleroma.Config
|
alias Pleroma.Config
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
alias Pleroma.Web.ActivityPub.MRF
|
|
||||||
|
|
||||||
require Pleroma.Constants
|
require Pleroma.Constants
|
||||||
|
|
||||||
@moduledoc "Filter activities depending on their age"
|
@moduledoc "Filter activities depending on their age"
|
||||||
@behaviour MRF
|
@behaviour Pleroma.Web.ActivityPub.MRF
|
||||||
|
|
||||||
defp check_date(%{"published" => published} = message) do
|
defp check_date(%{"published" => published} = message) do
|
||||||
with %DateTime{} = now <- DateTime.utc_now(),
|
with %DateTime{} = now <- DateTime.utc_now(),
|
||||||
|
|
|
@ -6,7 +6,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
|
||||||
alias Pleroma.User
|
alias Pleroma.User
|
||||||
alias Pleroma.Web.ActivityPub.MRF
|
alias Pleroma.Web.ActivityPub.MRF
|
||||||
@moduledoc "Filter activities depending on their origin instance"
|
@moduledoc "Filter activities depending on their origin instance"
|
||||||
@behaviour MRF
|
@behaviour Pleroma.Web.ActivityPub.MRF
|
||||||
|
|
||||||
require Pleroma.Constants
|
require Pleroma.Constants
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.SubchainPolicy do
|
||||||
|
|
||||||
require Logger
|
require Logger
|
||||||
|
|
||||||
@behaviour MRF
|
@behaviour Pleroma.Web.ActivityPub.MRF
|
||||||
|
|
||||||
defp lookup_subchain(actor) do
|
defp lookup_subchain(actor) do
|
||||||
with matches <- Config.get([:mrf_subchain, :match_actor]),
|
with matches <- Config.get([:mrf_subchain, :match_actor]),
|
||||||
|
|
Loading…
Reference in New Issue