projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78516a8
)
Only push to followers if they are addressed.
author
lain
<lain@soykaf.club>
Sun, 18 Feb 2018 22:01:37 +0000
(23:01 +0100)
committer
lain
<lain@soykaf.club>
Sun, 18 Feb 2018 22:01:37 +0000
(23:01 +0100)
lib/pleroma/web/activity_pub/activity_pub.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/web/activity_pub/activity_pub.ex
b/lib/pleroma/web/activity_pub/activity_pub.ex
index fb33f2e3ef2eddfc6e637fab797673acc3d0a443..168653035a3d056beb1aca744c904ba62b2b2ded 100644
(file)
--- a/
lib/pleroma/web/activity_pub/activity_pub.ex
+++ b/
lib/pleroma/web/activity_pub/activity_pub.ex
@@
-283,7
+283,12
@@
defmodule Pleroma.Web.ActivityPub.ActivityPub do
end
def publish(actor, activity) do
- {:ok, followers} = User.get_followers(actor)
+ followers = if user.follower_address in activity.recipients do
+ {:ok, followers} = User.get_followers(actor)
+ followers
+ else
+ []
+ end
remote_inboxes = (Pleroma.Web.Salmon.remote_users(activity) ++ followers)
|> Enum.filter(fn (user) -> User.ap_enabled?(user) end)