RemoteReportPolicy: Fix third-party report detection

This commit is contained in:
Mint 2024-04-12 23:04:37 +03:00 committed by b
commit 48af6850fc
2 changed files with 15 additions and 2 deletions

View file

@ -47,7 +47,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.RemoteReportPolicy do
end
with true <- Config.get([:mrf_remote_report, :reject_third_party]),
String.starts_with?(to, Pleroma.Web.Endpoint.url()) do
false <- String.starts_with?(to, Pleroma.Web.Endpoint.url()) do
{:reject, "[RemoteReportPolicy] Third-party: #{to}"}
else
_ -> {:ok, object}