1
0
Fork 0
forked from mirrors/akkoma

Merge branch 'chore/standardize-mrf-behavior' into 'develop'

Standardize @behaviour usage in MRFs

See merge request pleroma/pleroma!2212
This commit is contained in:
lain 2020-02-18 14:36:10 +00:00
commit 3fa2ac68df
3 changed files with 3 additions and 4 deletions

View file

@ -5,12 +5,11 @@
defmodule Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy do
alias Pleroma.Config
alias Pleroma.User
alias Pleroma.Web.ActivityPub.MRF
require Pleroma.Constants
@moduledoc "Filter activities depending on their age"
@behaviour MRF
@behaviour Pleroma.Web.ActivityPub.MRF
defp check_date(%{"published" => published} = message) do
with %DateTime{} = now <- DateTime.utc_now(),

View file

@ -6,7 +6,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
alias Pleroma.User
alias Pleroma.Web.ActivityPub.MRF
@moduledoc "Filter activities depending on their origin instance"
@behaviour MRF
@behaviour Pleroma.Web.ActivityPub.MRF
require Pleroma.Constants

View file

@ -8,7 +8,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.SubchainPolicy do
require Logger
@behaviour MRF
@behaviour Pleroma.Web.ActivityPub.MRF
defp lookup_subchain(actor) do
with matches <- Config.get([:mrf_subchain, :match_actor]),