commit: 3c30eadd5ede822d6310d3ce6534d26d7caf41f5
parent 8bc59e9743534f1be5a751ea857c74a5637f63ed
Author: Mint <mint@plagu.ee>
Date: Thu, 11 Jan 2024 20:38:12 +0300
Fix duplicate inbox deliveries
Diffstat:
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/changelog.d/fix-duplicate-inbox-deliveries.fix b/changelog.d/fix-duplicate-inbox-deliveries.fix
diff --git a/lib/pleroma/web/activity_pub/publisher.ex b/lib/pleroma/web/activity_pub/publisher.ex
@@ -255,7 +255,10 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
[priority_recipients, recipients]
|> Enum.map(fn recipients ->
recipients
- |> Enum.map(fn actor -> actor.inbox end)
+ |> Enum.map(fn %User{} = user ->
+ determine_inbox(activity, user)
+ end)
+ |> Enum.uniq()
|> Enum.filter(fn inbox -> should_federate?(inbox, public) end)
|> Instances.filter_reachable()
end)
@@ -302,7 +305,10 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
recipients(actor, activity)
|> Enum.map(fn recipients ->
recipients
- |> Enum.map(fn actor -> actor.inbox end)
+ |> Enum.map(fn %User{} = user ->
+ determine_inbox(activity, user)
+ end)
+ |> Enum.uniq()
|> Enum.filter(fn inbox -> should_federate?(inbox, public) end)
end)