1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-30 11:55:26 +00:00

Add relay followers to recipients when sending public entity

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-11-03 18:04:07 +01:00
parent 75fbcb985c
commit 52ea2ff579
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -28,6 +28,19 @@ defmodule Mobilizon.Federation.ActivityPub.Publisher do
Relay.publish(activity)
end
recipients =
if public && Config.get([:instance, :allow_relay]) do
followers_url = Relay.get_actor().followers_url
Logger.debug(
"Public activity, so adding relay followers URL to recipients: #{inspect(followers_url)}"
)
recipients ++ [followers_url]
else
recipients
end
recipients = Enum.uniq(recipients)
{recipients, followers} = convert_followers_in_recipients(recipients)