projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '1501-include-unlisted-posts-in-user-feed' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
pipeline.ex
diff --git
a/lib/pleroma/web/activity_pub/pipeline.ex
b/lib/pleroma/web/activity_pub/pipeline.ex
index d5abb75675449e4d2c75f106a7ffd95c808cf4b4..0c54c4b234d75c15e24c3bb59ffe620dd9747634 100644
(file)
--- a/
lib/pleroma/web/activity_pub/pipeline.ex
+++ b/
lib/pleroma/web/activity_pub/pipeline.ex
@@
-4,6
+4,7
@@
defmodule Pleroma.Web.ActivityPub.Pipeline do
alias Pleroma.Activity
defmodule Pleroma.Web.ActivityPub.Pipeline do
alias Pleroma.Activity
+ alias Pleroma.Config
alias Pleroma.Object
alias Pleroma.Repo
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Object
alias Pleroma.Repo
alias Pleroma.Web.ActivityPub.ActivityPub
@@
-44,7
+45,9
@@
defmodule Pleroma.Web.ActivityPub.Pipeline do
defp maybe_federate(%Activity{} = activity, meta) do
with {:ok, local} <- Keyword.fetch(meta, :local) do
defp maybe_federate(%Activity{} = activity, meta) do
with {:ok, local} <- Keyword.fetch(meta, :local) do
- if local do
+ do_not_federate = meta[:do_not_federate] || !Config.get([:instance, :federating])
+
+ if !do_not_federate && local do
Federator.publish(activity)
{:ok, :federated}
else
Federator.publish(activity)
{:ok, :federated}
else