fix credo
This commit is contained in:
parent
3af51afdd7
commit
fb77dc50aa
@ -59,12 +59,12 @@ defmodule Pleroma.Web.ActivityPub.MRF do
|
||||
base =
|
||||
%{
|
||||
mrf_policies: mrf_policies,
|
||||
exclusions: length(exclusions) > 0,
|
||||
exclusions: length(exclusions) > 0
|
||||
}
|
||||
|> Map.merge(policy_configs)
|
||||
|
||||
{:ok, base}
|
||||
end
|
||||
|
||||
def describe(), do: get_policies() |> describe()
|
||||
def describe, do: get_policies() |> describe()
|
||||
end
|
||||
|
@ -64,5 +64,5 @@ defmodule Pleroma.Web.ActivityPub.MRF.AntiFollowbotPolicy do
|
||||
def filter(message), do: {:ok, message}
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
@ -50,5 +50,5 @@ defmodule Pleroma.Web.ActivityPub.MRF.AntiLinkSpamPolicy do
|
||||
def filter(message), do: {:ok, message}
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
@ -14,5 +14,5 @@ defmodule Pleroma.Web.ActivityPub.MRF.DropPolicy do
|
||||
end
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
@ -43,5 +43,5 @@ defmodule Pleroma.Web.ActivityPub.MRF.EnsureRePrepended do
|
||||
|
||||
def filter(object), do: {:ok, object}
|
||||
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
@ -89,5 +89,5 @@ defmodule Pleroma.Web.ActivityPub.MRF.HellthreadPolicy do
|
||||
def filter(message), do: {:ok, message}
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{mrf_hellthread: Pleroma.Config.get([:mrf_hellthread])}}
|
||||
def describe, do: {:ok, %{mrf_hellthread: Pleroma.Config.get([:mrf_hellthread])}}
|
||||
end
|
||||
|
@ -96,7 +96,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.KeywordPolicy do
|
||||
def filter(message), do: {:ok, message}
|
||||
|
||||
@impl true
|
||||
def describe() do
|
||||
def describe do
|
||||
# This horror is needed to convert regex sigils to strings
|
||||
mrf_keyword =
|
||||
Pleroma.Config.get(:mrf_keyword, [])
|
||||
|
@ -29,5 +29,5 @@ defmodule Pleroma.Web.ActivityPub.MRF.NoPlaceholderTextPolicy do
|
||||
def filter(object), do: {:ok, object}
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
@ -12,5 +12,5 @@ defmodule Pleroma.Web.ActivityPub.MRF.NoOpPolicy do
|
||||
end
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
@ -26,5 +26,5 @@ defmodule Pleroma.Web.ActivityPub.MRF.NormalizeMarkup do
|
||||
|
||||
def filter(object), do: {:ok, object}
|
||||
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
@ -50,5 +50,5 @@ defmodule Pleroma.Web.ActivityPub.MRF.RejectNonPublic do
|
||||
def filter(object), do: {:ok, object}
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{mrf_rejectnonpublic: Pleroma.Config.get([:mrf_rejectnonpublic])}}
|
||||
def describe, do: {:ok, %{mrf_rejectnonpublic: Pleroma.Config.get([:mrf_rejectnonpublic])}}
|
||||
end
|
||||
|
@ -181,7 +181,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
|
||||
def filter(object), do: {:ok, object}
|
||||
|
||||
@impl true
|
||||
def describe() do
|
||||
def describe do
|
||||
exclusions = Pleroma.Config.get([:instance, :mrf_transparency_exclusions])
|
||||
|
||||
mrf_simple =
|
||||
|
@ -39,5 +39,5 @@ defmodule Pleroma.Web.ActivityPub.MRF.SubchainPolicy do
|
||||
def filter(message), do: {:ok, message}
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
@ -151,5 +151,5 @@ defmodule Pleroma.Web.ActivityPub.MRF.TagPolicy do
|
||||
def filter(message), do: {:ok, message}
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
@ -29,7 +29,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.UserAllowListPolicy do
|
||||
def filter(object), do: {:ok, object}
|
||||
|
||||
@impl true
|
||||
def describe() do
|
||||
def describe do
|
||||
mrf_user_allowlist =
|
||||
Config.get([:mrf_user_allowlist], [])
|
||||
|> Enum.into(%{}, fn {k, v} -> {k, length(v)} end)
|
||||
|
@ -9,5 +9,5 @@ defmodule MRFModuleMock do
|
||||
def filter(message), do: {:ok, message}
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{mrf_module_mock: "some config data"}}
|
||||
def describe, do: {:ok, %{mrf_module_mock: "some config data"}}
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user