mirror of
https://git.youjo.love/youjo/youjo-be.git
synced 2025-01-19 18:56:08 +01:00
Only push to followers if they are addressed.
This commit is contained in:
parent
78516a8daa
commit
342d0b01d1
1 changed files with 6 additions and 1 deletions
|
@ -283,7 +283,12 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
||||||
end
|
end
|
||||||
|
|
||||||
def publish(actor, activity) do
|
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)
|
remote_inboxes = (Pleroma.Web.Salmon.remote_users(activity) ++ followers)
|
||||||
|> Enum.filter(fn (user) -> User.ap_enabled?(user) end)
|
|> Enum.filter(fn (user) -> User.ap_enabled?(user) end)
|
||||||
|
|
Loading…
Reference in a new issue