Only push to followers if they are addressed.

This commit is contained in:
lain 2018-02-18 23:01:37 +01:00
parent 78516a8daa
commit 342d0b01d1

View File

@ -283,7 +283,12 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
end
def publish(actor, activity) do
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)