Blocking: Don't federate if the options is set.
This commit is contained in:
parent
44bb7cfccd
commit
84f9ca1956
2 changed files with 55 additions and 0 deletions
|
|
@ -31,6 +31,15 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidator do
|
|||
|> BlockValidator.cast_and_validate()
|
||||
|> Ecto.Changeset.apply_action(:insert) do
|
||||
block_activity = stringify_keys(block_activity)
|
||||
outgoing_blocks = Pleroma.Config.get([:activitypub, :outgoing_blocks])
|
||||
|
||||
meta =
|
||||
if !outgoing_blocks do
|
||||
Keyword.put(meta, :do_not_federate, true)
|
||||
else
|
||||
meta
|
||||
end
|
||||
|
||||
{:ok, block_activity, meta}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue