don't publish public activities to quarantined
This commit is contained in:
parent
516d155558
commit
4e693e674e
2 changed files with 7 additions and 11 deletions
|
@ -104,9 +104,6 @@ defp signature_host(%URI{port: port, scheme: scheme, host: host}) do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp should_federate?(inbox, public) do
|
defp should_federate?(inbox, public) do
|
||||||
if public do
|
|
||||||
true
|
|
||||||
else
|
|
||||||
%{host: host} = URI.parse(inbox)
|
%{host: host} = URI.parse(inbox)
|
||||||
|
|
||||||
quarantined_instances =
|
quarantined_instances =
|
||||||
|
@ -116,7 +113,6 @@ defp should_federate?(inbox, public) do
|
||||||
|
|
||||||
!Pleroma.Web.ActivityPub.MRF.subdomain_match?(quarantined_instances, host)
|
!Pleroma.Web.ActivityPub.MRF.subdomain_match?(quarantined_instances, host)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
@spec recipients(User.t(), Activity.t()) :: list(User.t()) | []
|
@spec recipients(User.t(), Activity.t()) :: list(User.t()) | []
|
||||||
defp recipients(actor, activity) do
|
defp recipients(actor, activity) do
|
||||||
|
|
|
@ -267,7 +267,7 @@ test "publish to url with with different ports" do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "publish/2" do
|
describe "publish/2" do
|
||||||
test_with_mock "doesn't publish a non-public activity to quarantined instances.",
|
test_with_mock "doesn't publish any activity to quarantined instances.",
|
||||||
Pleroma.Web.Federator.Publisher,
|
Pleroma.Web.Federator.Publisher,
|
||||||
[:passthrough],
|
[:passthrough],
|
||||||
[] do
|
[] do
|
||||||
|
|
Loading…
Reference in a new issue