mix format
This commit is contained in:
parent
fd83b86b99
commit
55612cb8ee
@ -39,11 +39,12 @@ defmodule Pleroma.Web.ActivityPub.MRF.RemoteReportPolicy do
|
|||||||
end
|
end
|
||||||
|
|
||||||
defp maybe_reject_third_party(%{"object" => objects} = object) do
|
defp maybe_reject_third_party(%{"object" => objects} = object) do
|
||||||
{_, to} = case objects do
|
{_, to} =
|
||||||
[head | tail] when is_binary(head) -> {tail, head}
|
case objects do
|
||||||
s when is_binary(s) -> {[], s}
|
[head | tail] when is_binary(head) -> {tail, head}
|
||||||
_ -> {[], ""}
|
s when is_binary(s) -> {[], s}
|
||||||
end
|
_ -> {[], ""}
|
||||||
|
end
|
||||||
|
|
||||||
with true <- Config.get([:mrf_remote_report, :reject_third_party]),
|
with true <- Config.get([:mrf_remote_report, :reject_third_party]),
|
||||||
String.starts_with?(to, Pleroma.Web.Endpoint.url()) do
|
String.starts_with?(to, Pleroma.Web.Endpoint.url()) do
|
||||||
|
Loading…
Reference in New Issue
Block a user