From: lain Date: Sun, 18 Feb 2018 22:01:37 +0000 (+0100) Subject: Only push to followers if they are addressed. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=342d0b01d17b3035378d6906672e1e8c4008ff4c;p=akkoma Only push to followers if they are addressed. --- diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index fb33f2e3e..168653035 100644 --- 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)