fix credo
This commit is contained in:
parent
10fef2fcee
commit
4244e17de0
|
@ -59,12 +59,12 @@ def describe(policies) 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 @@ def filter(%{"type" => "Follow", "actor" => actor_id} = message) do
|
|||
def filter(message), do: {:ok, message}
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
|
|
@ -50,5 +50,5 @@ def filter(%{"type" => "Create", "actor" => actor, "object" => object} = message
|
|||
def filter(message), do: {:ok, message}
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
|
|
@ -14,5 +14,5 @@ def filter(object) do
|
|||
end
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
|
|
@ -40,5 +40,5 @@ def filter(%{"type" => "Create", "object" => child_object} = object) do
|
|||
|
||||
def filter(object), do: {:ok, object}
|
||||
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
|
|
@ -92,5 +92,5 @@ def filter(%{"type" => "Create"} = message) 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
|
||||
|
|
|
@ -98,7 +98,7 @@ def filter(%{"type" => "Create", "object" => %{"content" => _content}} = message
|
|||
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, [])
|
||||
|
|
|
@ -55,5 +55,5 @@ def filter(
|
|||
def filter(message), do: {:ok, message}
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
|
|
@ -23,5 +23,5 @@ def filter(%{"type" => "Create"} = message) do
|
|||
def filter(message), do: {:ok, message}
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
|
|
@ -21,5 +21,5 @@ def filter(
|
|||
def filter(object), do: {:ok, object}
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
|
|
@ -12,5 +12,5 @@ def filter(object) do
|
|||
end
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
|
|
@ -22,5 +22,5 @@ def filter(%{"type" => "Create", "object" => child_object} = object) do
|
|||
|
||||
def filter(object), do: {:ok, object}
|
||||
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
|
|
@ -46,5 +46,5 @@ def filter(%{"type" => "Create"} = object) 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
|
||||
|
|
|
@ -179,7 +179,7 @@ def filter(%{"id" => actor, "type" => obj_type} = object)
|
|||
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 @@ def filter(%{"actor" => actor} = message) do
|
|||
def filter(message), do: {:ok, message}
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
|
|
@ -167,5 +167,5 @@ def filter(%{"actor" => actor, "type" => "Create"} = message),
|
|||
def filter(message), do: {:ok, message}
|
||||
|
||||
@impl true
|
||||
def describe(), do: {:ok, %{}}
|
||||
def describe, do: {:ok, %{}}
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ def filter(%{"actor" => actor} = object) 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 a new issue